All Standard Plots
The full set of standard plots based on YAML files in subdirectories of KPF-Pipeline/static/tsdb_plot_configs/ are shown below
[1]:
from modules.quicklook.src.analyze_time_series import AnalyzeTimeSeries
import pandas as pd
from datetime import datetime
pd.set_option('display.max_rows', None)
%matplotlib inline
[2]:
db_path = 'kpf_ts.db' # name of database file
myTS = AnalyzeTimeSeries(db_path=db_path)
INFO: Starting AnalyzeTimeSeries
INFO: Starting KPF_TSDB
INFO: Jupyter Notebook environment detected.
INFO: Base data directory: /data/L0
INFO: Backend: sqlite
INFO: Path of database file: /code/KPF-Pipeline/docs/source/tutorials/kpf_ts.db
INFO: Metadata table exists.
INFO: Metadata table read.
INFO: Data tables exist.
[3]:
myTS.plot_all_quicklook(print_plot_names=True)
Plots available:
'ccd_controller': CCD Controller Temperatures
'ccd_readspeed': CCD Read Speed
'ccd_temp': CCD Temperatures
'ccd_dark_current': CCD Dark Current
'ccd_readnoise': CCD Read Noise
'xdisp_offset': CCD Cross Dispersion Offsets
'autocal-flat_snr_relative': autocal-flat-all Relative SNR Ratio
'good_orders_etalon': Good Orders - Etalon
'good_orders_lfc': Good Orders - LFC
'lamp_power': Power Meter Measurements of Lamp Brightness
'lfc': LFC Diagnostics
'saturated_etalon': Saturated Lines - Etalon
'saturated_lfc': Saturated Lines - LFC
'saturated_thar': Saturated Lines - ThAr
'autocal-flat_flux_relative': autocal-flat-all Relative Flux Ratio
'hcl': Hollow-Cathode Lamp Temperatures
'autocal-flat_snr': autocal-flat-all SNR & Flux Ratio
'saturated_une': Saturated Lines - Une
'chamber_temp': KPF Spectrometer Temperatures
'chamber_temp_detail': Chamber Temperature Detail
'hallway_temp': KPF Hallway Temperature
'spatial_gradients': KPF Spectrometer Spatial Temperature Gradients
'drphash': KPF-Pipeline Commit Hash
'master_age': Ages of Master Files
'drptag': KPF-Pipeline Version Number
'files_missing': 2D/L1/L2 Files Missing
'nobs_all_sources': All Sources - Number of Observations
'nobs_bias': Bias autocal - Number of Observations
'nobs_dark': Dark autocal - Number of Observations
'nobs_flat': Flat autocal - Number of Observations
'nobs_lfc': LFC autocal - Number of Observations
'nobs_star': Stars - Number of Observations
'nobs_sun': SoCal - Number of Observations
'guiding': Guiding Errors & Bias
'seeing': Seeing
'bcvel': Barycentric Variations
'guider_images': Guider Images
'sun_moon': Separation of Sun and Moon from Target
'observing_snr': Observing SNR & Flux Ratio for Stars
'junk_status': Junk Status
'qc_em': QC - Exposure Meter
'qc_flat': QC - Flat Metrics
'qc_kwds': QC - TARG Keywords
'qc_lfc': QC - LFC Metrics
'qc_low_flux': QC - Low Dark and Bias Flux
'qc_monotonic_wls': QC - Monotonic WLS in L1
'qc_ntp': QC - Network Time Protocol (NTP)
'qc_pos_2d_snr': QC - Not Negative 2D SNR
'qc_time_check': QC - L0 and L2 Times Consistent
'qc_wls': QC - Wavelength Solution Metrics
'qc_cals': QC - Master File Ages
'qc_agitator': QC - Agitator Running
'qc_master_age': QC - Master File Ages
'qc_guider': QC - Guider Performance
'qc_data_kwds': QC - Data and Keywords Present
'qc_etalon': QC - Etalon Metrics
'qc_goodread': QC - Good Read Metric
'qc_observing': QC - Observing
'autocal_erv': LFC, ThAr, & Etalon ERVs (autocal)
'autocal_etalon_rv': Etalon RVs (autocal)
'autocal_rv': LFC, ThAr, & Etalon RVs (autocal)
'socal_rv': SoCal RVs
'socal_snr': SoCal SNR & Flux Ratio
'wls_median': WLS Median Difference
'wls_stdev': WLS Standard Deviation of (L1 - L1_ref)
'fiber_temp': Fiber Temperatures
'etalon': Etalon Temperatures
'hk_temp': Ca H&K Spectrometer Temperatures
'agitator': KPF Agitator
One can generate all plots from the plot_all_quicklook_daterange() method with a single call.
[4]:
myTS = AnalyzeTimeSeries(db_path=db_path)
myTS.plot_all_quicklook(datetime(2024, 10, 3), interval='day', show_plot=True, verbose=True)
INFO: Starting AnalyzeTimeSeries
INFO: Starting KPF_TSDB
INFO: Jupyter Notebook environment detected.
INFO: Base data directory: /data/L0
INFO: Backend: sqlite
INFO: Path of database file: /code/KPF-Pipeline/docs/source/tutorials/kpf_ts.db
INFO: Metadata table exists.
INFO: Metadata table read.
INFO: Data tables exist.
INFO: AnalyzeTimeSeries.plot_all_quicklook: making ccd_controller
INFO: AnalyzeTimeSeries.plot_all_quicklook: making ccd_readspeed
INFO: AnalyzeTimeSeries.plot_all_quicklook: making ccd_temp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making ccd_dark_current
INFO: AnalyzeTimeSeries.plot_all_quicklook: making ccd_readnoise
INFO: AnalyzeTimeSeries.plot_all_quicklook: making xdisp_offset
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal-flat_snr_relative
INFO: AnalyzeTimeSeries.plot_all_quicklook: making good_orders_etalon
INFO: AnalyzeTimeSeries.plot_all_quicklook: making good_orders_lfc
INFO: AnalyzeTimeSeries.plot_all_quicklook: making lamp_power
INFO: AnalyzeTimeSeries.plot_all_quicklook: making lfc
INFO: AnalyzeTimeSeries.plot_all_quicklook: making saturated_etalon
INFO: AnalyzeTimeSeries.plot_all_quicklook: making saturated_lfc
INFO: AnalyzeTimeSeries.plot_all_quicklook: making saturated_thar
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal-flat_flux_relative
INFO: AnalyzeTimeSeries.plot_all_quicklook: making hcl
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal-flat_snr
INFO: AnalyzeTimeSeries.plot_all_quicklook: making saturated_une
INFO: AnalyzeTimeSeries.plot_all_quicklook: making chamber_temp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making chamber_temp_detail
INFO: AnalyzeTimeSeries.plot_all_quicklook: making hallway_temp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making spatial_gradients
INFO: AnalyzeTimeSeries.plot_all_quicklook: making drphash
INFO: AnalyzeTimeSeries.plot_all_quicklook: making master_age
INFO: AnalyzeTimeSeries.plot_all_quicklook: making drptag
INFO: AnalyzeTimeSeries.plot_all_quicklook: making files_missing
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_all_sources
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_bias
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_dark
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_flat
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_lfc
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_star
INFO: AnalyzeTimeSeries.plot_all_quicklook: making nobs_sun
INFO: AnalyzeTimeSeries.plot_all_quicklook: making guiding
INFO: AnalyzeTimeSeries.plot_all_quicklook: making seeing
INFO: AnalyzeTimeSeries.plot_all_quicklook: making bcvel
INFO: AnalyzeTimeSeries.plot_all_quicklook: making guider_images
INFO: AnalyzeTimeSeries.plot_all_quicklook: making sun_moon
INFO: AnalyzeTimeSeries.plot_all_quicklook: making observing_snr
INFO: AnalyzeTimeSeries.plot_all_quicklook: making junk_status
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_em
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_flat
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_kwds
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_lfc
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_low_flux
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_monotonic_wls
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_ntp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_pos_2d_snr
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_time_check
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_wls
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_cals
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_agitator
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_master_age
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_guider
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_data_kwds
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_etalon
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_goodread
INFO: AnalyzeTimeSeries.plot_all_quicklook: making qc_observing
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal_erv
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal_etalon_rv
INFO: AnalyzeTimeSeries.plot_all_quicklook: making autocal_rv
INFO: AnalyzeTimeSeries.plot_all_quicklook: making socal_rv
INFO: AnalyzeTimeSeries.plot_all_quicklook: making socal_snr
INFO: AnalyzeTimeSeries.plot_all_quicklook: making wls_median
INFO: AnalyzeTimeSeries.plot_all_quicklook: making wls_stdev
INFO: AnalyzeTimeSeries.plot_all_quicklook: making fiber_temp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making etalon
INFO: AnalyzeTimeSeries.plot_all_quicklook: making hk_temp
INFO: AnalyzeTimeSeries.plot_all_quicklook: making agitator