from mats_utils.rawdata.read_data import read_MATS_data
import datetime as DT
from mats_l1_processing.instrument import Instrument
import numpy as np
import matplotlib.pyplot as plt
from database_generation.experimental_utils import plot_CCDimage
from mats_utils.rawdata.calibration import calibrate_dataframe
π Description
IR1 and IR2 single event correction maps always seem to have at the corner pixel [186,43].
se_mask array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 1.]])
π’ To reproduce run code below
from mats_utils.rawdata.read_data import read_MATS_data import datetime as DT from mats_l1_processing.instrument import Instrument import numpy as np import matplotlib.pyplot as plt from database_generation.experimental_utils import plot_CCDimage from mats_utils.rawdata.calibration import calibrate_dataframe
import matplotlib.pyplot as plt
def plot_calib_step(dfentry, step1name,step2name,title,divide=False, clim1=None, clim2=None,clim3=None,fig=None, ax=None):
%%
dayornight='dayglow' if dayornight=='dayglow': start_time = DT.datetime(2023, 2, 20, 19, 20, 0) stop_time = DT.datetime(2023, 2, 20, 19, 21, 0) elif dayornight=='nightglow': start_time = DT.datetime(2023, 2, 20, 20, 48, 0) stop_time = DT.datetime(2023, 2, 20, 20, 49, 0) else: raise Exception('dayornight not defined')
df = read_MATS_data(start_time,stop_time,version='0.7',level='1a',dev=False)
n=2 uv1=df[df.channel=='UV1'][:n].reset_index() uv2=df[df.channel=='UV2'][:n].reset_index() ir1=df[df.channel=='IR1'][:n].reset_index() ir2=df[df.channel=='IR2'][:n].reset_index() ir3=df[df.channel=='IR3'][:n].reset_index() ir4=df[df.channel=='IR4'][:n].reset_index()
instrument = Instrument('/Users/lindamegner/MATS/MATS-retrieval/MATS-analysis/Linda/calibration_data_MATSinstrument.toml')
%%
uv1cal=calibrate_dataframe(uv1, instrument, debug_outputs=True) uv2cal=calibrate_dataframe(uv2, instrument, debug_outputs=True)
%%
ir1cal=calibrate_dataframe(ir1, instrument, debug_outputs=True)