-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #751 from Keck-DataReductionPipelines/develop
Version 2.5.3
- Loading branch information
Showing
73 changed files
with
4,140 additions
and
1,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "76101924", | ||
"metadata": {}, | ||
"source": [ | ||
"This notebook provides an example running a quality control (QC) method with the KPF DRP." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "ce403f32", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Import packages for reading files\n", | ||
"\n", | ||
"from modules.Utils.kpf_parse import get_datecode\n", | ||
"from kpfpipe.models.level0 import KPF0\n", | ||
"from modules.quality_control.src.quality_control import QCL0" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "8240bcca", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# Example files\n", | ||
"\n", | ||
"# Good L0 files\n", | ||
"#ObsID = 'KP.20230830.33530.82' # file with no missing data products\n", | ||
"#ObsID = 'KP.20230829.76026.81' # file with no missing data products\n", | ||
"\n", | ||
"# Bad L0 file\n", | ||
"ObsID = 'KP.20231108.77769.16' # file with missing Red\n", | ||
"\n", | ||
"# Read the file\n", | ||
"L0_filename = '/data/L0/' + get_datecode(ObsID) + '/' + ObsID + '.fits'\n", | ||
"L0 = KPF0.from_fits(L0_filename)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "850c1449", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Data products that are supposed to be in this L0 file: ['Green', 'Red', 'ExpMeter', 'Telemetry', 'Pyrheliometer']\n", | ||
"Data products in L0 file: ['Green', 'ExpMeter', 'Telemetry', 'Pyrheliometer']\n", | ||
"Red not present in L0 file. QC(L0_data_products_check) failed.\n", | ||
"---->add_qc_keyword_to_header: qc_name, keyword, value, comment = L0_data_products_check, DATAPRL0, False, QC: L0 data present check\n", | ||
"QC result: False\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"# Test of 'L0_data_products_check'\n", | ||
"\n", | ||
"qcl0 = QCL0(L0)\n", | ||
"qc_name = 'L0_data_products_check'\n", | ||
"qc_value = qcl0.L0_data_products_check(L0)\n", | ||
"qcl0.add_qc_keyword_to_header(qc_name,qc_value)\n", | ||
"L0_new = qcl0.fits_object\n", | ||
"print('QC result: ' + str(L0_new.header['PRIMARY']['DATAPRL0']))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.6.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[LOGGER] | ||
start_log = True | ||
log_path = logs/pipe_log.log | ||
log_level = info | ||
log_verbose = True | ||
log_directory = /data/logs_QLP/ | ||
|
||
[ARGUMENT] | ||
# see write_headers_match_files.cfg for a description of how to set fullpath | ||
fullpath = '/data/L1/202?????/KP.20231104.39907.04*.fits' | ||
output_dir = /testdata/ | ||
do_dark_curr = True # dark current headers | ||
do_gdhdr = True # guider headers | ||
do_emhdr = True # exposure meter headers | ||
do_snr = True # L1 SNR headers | ||
do_fr = True # L1 orderlet flux ratios headers | ||
|
||
[MODULE_CONFIGS] | ||
quicklook = modules/quicklook/configs/default.cfg |
Oops, something went wrong.