Usage and more of the Calibrations Class [v1.1]


In [1]:
# imports
import os
import glob

from importlib import reload

import numpy as np

from pypit import arparse
from pypit import calibrations
from pypit import pypitsetup

from pypit import arpixels

from pypit.spectrographs import keck_lris

In [2]:
os.getenv('PYPIT_DEV')


Out[2]:
'/home/xavier/local/Python/PYPIT-development-suite/'

Multi-Slit Example


In [3]:
spectrograph='keck_lris_red'
spectro_class = keck_lris.KeckLRISBSpectrograph()

Fuss with settings..


In [4]:
from pypit import arparse as settings
settings.dummy_settings(spectrograph=spectrograph)


[INFO]    :: arparse.py 75 load_file() - Loading default settings
[INFO]    :: arparse.py 87 load_file() - Loading base settings from settings.baseargflag
[INFO]    :: arparse.py 1393 run_ncpus() - Setting 7 CPUs
[INFO]    :: arparse.py 75 load_file() - Loading default settings
[INFO]    :: arparse.py 75 load_file() - Loading default settings
[INFO]    :: arparse.py 87 load_file() - Loading base settings from settings.basespect
[INFO]    :: arparse.py 75 load_file() - Loading default settings

FITS table


In [5]:
keck_lris_files = glob.glob(os.getenv('PYPIT_DEV')+'RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR*')
keck_lris_files.sort()
len(keck_lris_files)


Out[5]:
23

In [6]:
keck_lris_files[4]


Out[6]:
'/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07348.fits'

In [7]:
# Pop the unknown file
keck_lris_files.pop(4)


Out[7]:
'/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07348.fits'

In [8]:
setupc = pypitsetup.PypitSetup(settings.argflag, settings.spect)

In [9]:
_, fitstbl, setup_dict = setupc.run(file_list=keck_lris_files)


[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05529.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05589.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05649.fits
[WARNING] :: arload.py 157 load_headers() - TARGNAME keyword not in header. Setting to None
[WARNING] :: arload.py 157 load_headers() - RA keyword not in header. Setting to None
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05709.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07412.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07470.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07529.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07587.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07646.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07703.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07762.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07820.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07878.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07937.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.13991.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14090.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14167.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14244.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14322.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14399.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.17613.fits
[INFO]    :: arload.py 192 load_headers() - Successfully loaded headers for file:
             /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.40478.fits
[INFO]    :: arload.py 195 load_headers() - Checking spectrograph settings for required header information
[INFO]    :: arload.py 204 load_headers() - Headers loaded for 22 files successfully
[INFO]    :: arsort.py 110 type_data() - Typing files
[INFO]    :: arsort.py 169 type_data() - Making forced file identification changes
[WARNING] :: arsort.py 170 type_data() - Note that the image will have *only* the specified type
[INFO]    :: arsort.py 202 type_data() - Typing completed!
[INFO]    :: pypitsetup.py 228 type_data() - Adding file type information to the fitstbl
[INFO]    :: arsort.py 964 match_to_science() - Matching calibrations to Science frames
[INFO]    :: arsort.py 973 match_to_science() - =================================================
[INFO]    :: arsort.py 975 match_to_science() - Matching calibrations to OFF_J1044p6306: LR.20160216.40478.fits
[INFO]    :: arsort.py 1025 match_to_science() -   Found 4 arc frame for OFF_J1044p6306 (1 required)
[INFO]    :: arsort.py 1025 match_to_science() -   Found 10 bias frame for OFF_J1044p6306 (5 required)
[INFO]    :: arsort.py 988 match_to_science() -   Dark frames not required.  Not matching..
[INFO]    :: arsort.py 1002 match_to_science() -    No pinhole frames are required.  Not matching..
[INFO]    :: arsort.py 1025 match_to_science() -   Found 6 pixelflat frame for OFF_J1044p6306 (3 required)
[INFO]    :: arsort.py 1025 match_to_science() -   Found 1 standard frame for OFF_J1044p6306 (1 required)
[INFO]    :: arsort.py 1025 match_to_science() -   Found 6 trace frame for OFF_J1044p6306 (3 required)
[INFO]    :: arsort.py 1047 match_to_science() - Science frames successfully matched to calibration frames

In [10]:
fitstbl[0:5]


Out[10]:
Table length=5
directoryfilenameutctargetidnametimedateequinoxradecairmassnaxis0naxis1binningexptimefilter1filter2hatchshutopenshutclosedeckerlampsslitwidslitlendetrotdichroicdispnamedispanglelampname01lampstat01lampname02lampstat02lampname03lampstat03lampname04lampstat04lampname05lampstat05lampname06lampstat06lampname07lampstat07lampname08lampstat08lampname09lampstat09lampname10lampstat10lampname11lampstat11lampname12lampstat12waveceninstrumearcbiasdarkpinholepixelflatsciencestandardtraceunknownfailuressci_ID
str92str22str11str14str4float64str19str4str11str11float64str4str4str3int64str5str4str6str4str4str8str4str4str4str4str3str8float64str7str3str4str3str5str3str7str3str4str3str7str3str5str3str7str3str9str3str6str3str6str3str7str3float64str13boolboolboolboolboolboolboolboolboolboolint64
/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05529.fits01:32:09.90dark1378417.53612016-02-16T01:32:11None00:00:00.00+00:00:00.01.41294028NoneNone2,21clearNoneclosedNoneNonelong_0.7NoneNoneNoneNone560600/750027.0812645MERCURYonNEONonARGONonCADMIUMonZINConKRYPTONonXENONonFEARGONoffDEUTERIUMoffFLAMP1offFLAMP2offHALOGENoff7150.0078125keck_lris_redTrueFalseFalseFalseFalseFalseFalseFalseFalseFalse0
/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05589.fits01:33:09.40dark1378417.552632016-02-16T01:33:11None00:00:00.00+00:00:00.01.41294028NoneNone2,21clearNoneclosedNoneNonelong_0.7NoneNoneNoneNone560600/750027.0812645MERCURYonNEONonARGONonCADMIUMonZINConKRYPTONonXENONonFEARGONoffDEUTERIUMoffFLAMP1offFLAMP2offHALOGENoff7150.0078125keck_lris_redTrueFalseFalseFalseFalseFalseFalseFalseFalseFalse0
/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05649.fits01:34:09.64dark1378417.569362016-02-16T01:34:11None00:00:00.00+00:00:00.01.41294028NoneNone2,21clearNoneclosedNoneNonelong_0.7NoneNoneNoneNone560600/750027.0812645MERCURYonNEONonARGONonCADMIUMonZINConKRYPTONonXENONonFEARGONoffDEUTERIUMoffFLAMP1offFLAMP2offHALOGENoff7150.0078125keck_lris_redTrueFalseFalseFalseFalseFalseFalseFalseFalseFalse0
/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05709.fits01:35:09.44Nonedark1378417.585972016-02-16T01:35:11NoneNone+00:00:00.01.41294028NoneNone2,21clearNoneclosedNoneNonelong_0.7NoneNoneNoneNone560600/750027.0812645MERCURYonNEONonARGONonCADMIUMonZINConKRYPTONonXENONonFEARGONoffDEUTERIUMoffFLAMP1offFLAMP2offHALOGENoff7150.0078125keck_lris_redTrueFalseFalseFalseFalseFalseFalseFalseFalseFalse1
/home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07412.fits02:03:32.09unknowndark1378418.058942016-02-16T02:03:31None15:20:00.00+45:00:00.01.41309745NoneNone2,20clearNoneclosedNoneNonelong_0.7NoneNoneNoneNone560600/750027.0812645MERCURYoffNEONoffARGONoffCADMIUMoffZINCoffKRYPTONoffXENONoffFEARGONoffDEUTERIUMoffFLAMP1offFLAMP2offHALOGENoff7150.0078125keck_lris_redFalseTrueFalseFalseFalseFalseFalseFalseFalseFalse0

Choose the detector, sci_ID


In [11]:
det = 2
sci_ID = 1
setup = 'C_02_aa'

Calibrations

More settings fussing


In [12]:
# TODO -- Update/avoid the following with new settings
tsettings = settings.argflag.copy()
tsettings['detector'] = settings.spect[settings.get_dnum(det)]
try:
    tsettings['detector']['dataext'] = tsettings['detector']['dataext01']  # Kludge; goofy named key
except KeyError: # LRIS, DEIMOS
    tsettings['detector']['dataext'] = None
tsettings['detector']['dispaxis'] = settings.argflag['trace']['dispersion']['direction']
tsettings['detector']['binning'] = fitstbl['binning'][0]

# New ones
tsettings['masters'] = settings.argflag['reduce']['masters']
tsettings['masters']['directory'] = settings.argflag['run']['directory']['master']+'_'+ settings.argflag['run']['spectrograph']
tsettings['masters']['setup'] = setup

Instantiate


In [13]:
reload(calibrations)
caliBrate = calibrations.MultiSlitCalibrations(fitstbl, save_masters=False, write_qa=False)

In [14]:
# Setup for a specific science frame + detector
caliBrate.reset(setup, det, sci_ID, tsettings)

Datasec_img


In [15]:
_ = caliBrate.get_datasec_img()


[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.40478.fits

Bias


In [16]:
bias = caliBrate.get_bias()


[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07703.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07762.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07820.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07878.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07937.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.07703.fits
[WARNING] :: processimages.py 376 process() - Your images have not been bias subtracted!
[INFO]    :: arcomb.py 91 core_comb_frames() - Combining 5 bias frames
[WORK IN ]::
[PROGRESS]:: arcomb.py 95 core_comb_frames() - lscomb feature has not been included here yet...
[INFO]    :: arcomb.py 130 core_comb_frames() - Finding saturated and non-linear pixels
[INFO]    :: arcomb.py 155 core_comb_frames() - Rejecting cosmic rays
[INFO]    :: arcomb.py 194 core_comb_frames() - Not rejecting any low/high pixels
[INFO]    :: arcomb.py 198 core_comb_frames() - Rejecting deviant pixels
[INFO]    :: arcomb.py 215 core_comb_frames() - Combining frames with a mean operation
[INFO]    :: arcomb.py 227 core_comb_frames() - Replacing completely masked pixels with the median value of the input frames
[INFO]    :: arcomb.py 239 core_comb_frames() - 5 bias frames combined successfully!

In [17]:
caliBrate.show(bias)

Grab the bias again


In [18]:
bias = caliBrate.get_bias()


[INFO]    :: calibrations.py 191 get_bias() - Reloading the bias from the internal dict

In [19]:
caliBrate.calib_dict[caliBrate.setup].keys()


Out[19]:
dict_keys(['bias'])

Try to jump too far ahead


In [20]:
caliBrate.get_wv_calib()


[WARNING] :: calibrations.py 588 _chk_objs() - You need to generate msarc prior to this calibration..
[WARNING] :: calibrations.py 597 _chk_objs() - Use get_arc

Run them all 'from scratch'


In [21]:
caliBrate.steps


Out[21]:
['datasec_img',
 'bias',
 'arc',
 'bpm',
 'pixlocn',
 'slits',
 'wv_calib',
 'tilts',
 'pixflatnrm',
 'wave']

In [22]:
caliBrate.run_the_steps()


[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.40478.fits
[INFO]    :: calibrations.py 191 get_bias() - Reloading the bias from the internal dict
[INFO]    :: calibrations.py 164 get_arc() - Preparing a master arc frame
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05709.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.05709.fits
[INFO]    :: processimages.py 263 bias_subtract() - Bias subtracting your image(s)
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: keck_lris.py 160 bpm() - Using hard-coded BPM for det=2 on LRISr
[INFO]    :: arpixels.py 65 core_gen_pixloc() - Deriving physical pixel locations on the detector
[INFO]    :: arpixels.py 68 core_gen_pixloc() - Pixel gap in the dispersion direction = 0.000
[INFO]    :: arpixels.py 69 core_gen_pixloc() - Pixel size in the dispersion direction = 1.000
[INFO]    :: arpixels.py 72 core_gen_pixloc() - Pixel gap in the spatial direction = 0.000
[INFO]    :: arpixels.py 73 core_gen_pixloc() - Pixel size in the spatial direction = 1.000
[INFO]    :: arpixels.py 78 core_gen_pixloc() - Saving pixel locations
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14244.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14322.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14399.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14244.fits
[INFO]    :: processimages.py 263 bias_subtract() - Bias subtracting your image(s)
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arcomb.py 91 core_comb_frames() - Combining 3 trace_image frames
[WORK IN ]::
[PROGRESS]:: arcomb.py 95 core_comb_frames() - lscomb feature has not been included here yet...
[INFO]    :: arcomb.py 130 core_comb_frames() - Finding saturated and non-linear pixels
[INFO]    :: arcomb.py 155 core_comb_frames() - Rejecting cosmic rays
[INFO]    :: arcomb.py 194 core_comb_frames() - Not rejecting any low/high pixels
[INFO]    :: arcomb.py 198 core_comb_frames() - Rejecting deviant pixels
[INFO]    :: arcomb.py 215 core_comb_frames() - Combining frames with a weightmean operation
[INFO]    :: arcomb.py 227 core_comb_frames() - Replacing completely masked pixels with the maxnonsat value of the input frames
[INFO]    :: arcomb.py 239 core_comb_frames() - 3 trace_image frames combined successfully!
[WARNING] :: arprocimg.py 404 gain_frame() - Should probably be measuring the gain across the amplifier boundary
[INFO]    :: artraceslits.py 820 edgearr_from_binarr() - Detecting slit edges in the mstrace image
[INFO]    :: artraceslits.py 881 edgearr_from_binarr() - Applying bad pixel mask
[INFO]    :: artraceslits.py 939 edgearr_add_left_right() - 1 left edge and 1 right edge were found in the trace
[INFO]    :: artraceslits.py 965 edgearr_add_left_right() - Assigning slit edge traces
[INFO]    :: traceslits.py 363 _assign_edges() - Assigning left slit edges
[INFO]    :: traceslits.py 369 _assign_edges() - Assigning right slit edges
[INFO]    :: artraceslits.py 1166 edgearr_final_left_right() - 1 left edge and 1 right edge were found in the trace
[INFO]    :: artraceslits.py 568 edgearr_tcrude() - Crude tracing the edges
[INFO]    :: artraceslits.py 1317 fit_edges() - Fitting left slit traces
[INFO]    :: artraceslits.py 1319 fit_edges() - Fitting right slit traces
[INFO]    :: traceslits.py 392 _chk_for_longslit() - Only one slit was identified. Should be a longslit.
[INFO]    :: traceslits.py 521 _make_pixel_arrays() - Converting physical trace locations to nearest pixel
[INFO]    :: traceslits.py 528 _make_pixel_arrays() - Identifying the pixels belonging to each slit
[INFO]    :: ararc.py 113 get_censpec() - Extracting an approximate arc spectrum at the centre of each slit
[INFO]    :: ararc.py 67 setup_param() - Loading line list using ArI,NeI,HgI,KrI,XeI lamps
[INFO]    :: ararclines.py 68 load_arcline_list() - Rejecting select ArI lines
[WARNING] :: ararclines.py 100 reject_lines() - Am not sure this method does anything for real -- JXP 03-Jul-2018
[INFO]    :: ararclines.py 68 load_arcline_list() - Rejecting select NeI lines
[WARNING] :: ararclines.py 100 reject_lines() - Am not sure this method does anything for real -- JXP 03-Jul-2018
[INFO]    :: ararclines.py 68 load_arcline_list() - Rejecting select HgI lines
[WARNING] :: ararclines.py 100 reject_lines() - Am not sure this method does anything for real -- JXP 03-Jul-2018
[INFO]    :: ararclines.py 76 load_arcline_list() - Cutting down line list by wvmnx: 2900,11000
---------------------------------------------------
Report:
::   Number of lines recovered    = 83
::   Number of lines analyzed     = 83
::   Number of acceptable matches = 81
::   Best central wavelength      = 7174.84A
::   Best dispersion              = 1.59706A/pix
::   Best solution used pix_tol   = 1.0
::   Best solution had unknown    = True
---------------------------------------------------
[INFO]    :: ararc.py 113 get_censpec() - Extracting an approximate arc spectrum at the centre of each slit
[WORK IN ]::
[PROGRESS]:: artracewave.py 205 trace_tilt() - Detecting lines for slit 1
[INFO]    :: ararc.py 206 detect_lines() - Detecting lines
[INFO]    :: ararc.py 217 detect_lines() - Detecting the strongest, nonsaturated lines
[INFO]    :: artracewave.py 264 trace_tilt() - Modelling arc line tilts with 51 arc lines
[WORK IN ]::
[PROGRESS]:: artracewave.py 270 trace_tilt() - This next step could be multiprocessed to speed up the reduction
[INFO]    :: artracewave.py 444 trace_tilt() - Completed spectral tilt tracing
[WARNING] :: wavetilts.py 192 _analyze_lines() - There were 13 additional arc lines that should have been traced
             (perhaps lines were saturated?). Check the spectral tilt solution
[INFO]    :: artracewave.py 778 fit_tilts() - Fitting tilts with a low order, 2D legendre
[WORK IN ]::
[PROGRESS]:: arutils.py 754 polyfit2d_general() - Generalize to different polynomial types
[INFO]    :: artracewave.py 797 fit_tilts() - RMS (pixels): 0.004507755823045505
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14244.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14322.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14399.fits
[INFO]    :: keck_lris.py 236 read_lris() - Reading LRIS file: /home/xavier/local/Python/PYPIT-development-suite/RAW_DATA/Keck_LRIS_red/long_600_7500_d560/LR.20160216.14244.fits
[INFO]    :: processimages.py 263 bias_subtract() - Bias subtracting your image(s)
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arprocimg.py 74 bias_subtract() - Subtracting bias image from raw frame
[INFO]    :: arcomb.py 91 core_comb_frames() - Combining 3 pixelflat frames
[WORK IN ]::
[PROGRESS]:: arcomb.py 95 core_comb_frames() - lscomb feature has not been included here yet...
[INFO]    :: arcomb.py 130 core_comb_frames() - Finding saturated and non-linear pixels
[INFO]    :: arcomb.py 155 core_comb_frames() - Rejecting cosmic rays
[INFO]    :: arcomb.py 194 core_comb_frames() - Not rejecting any low/high pixels
[INFO]    :: arcomb.py 198 core_comb_frames() - Rejecting deviant pixels
[INFO]    :: arcomb.py 215 core_comb_frames() - Combining frames with a weightmean operation
[INFO]    :: arcomb.py 227 core_comb_frames() - Replacing completely masked pixels with the maxnonsat value of the input frames
[INFO]    :: arcomb.py 239 core_comb_frames() - 3 pixelflat frames combined successfully!
[WARNING] :: arprocimg.py 404 gain_frame() - Should probably be measuring the gain across the amplifier boundary
[INFO]    :: flatfield.py 297 run() - Setting pixels outside of slits to 1. in the flat.

In [23]:
caliBrate.show(caliBrate.mswave)

In [ ]: