SessionAnalyzer¶
-
class
Data_Reduction.SLATool.
SessionAnalyzer
(project=None, dss=None, year=None, DOY=None)¶ Bases:
object
Tool for reducing multiple data reduction sessions
- Attributes::
datapath DOY DSS examiners logger project projectdatapath projworkpath year
- Example::
In [1]: from Data_Reduction.SLATool import SessionAnalyzer In [2]: sa = SessionAnalyzer(project=’67P’, year=2015, DOY=204) In [3]: x, sum_y, sum_Tsys, sum_intgr = sa.get_average()
Methods Summary
Tsys_scaling
([weather_data, examiner_keys, Tatm])factors to rescale the system powers or temperatures to K based on FE noise
fit_Tsys_to_airmass
([weather_data, …])Fit tipping curve data implicit in sessions elev and Tsys data
get_average
([source])Computes average spectrum for a source in the session
get_good_weather_data
([examiner_keys])Get data from specific datasets for analyzing environmental conditions.
Gets a list of sources from all the datasets in the session
creates the directory path to the data from the session
open_datafiles
(datafiles)Opens the files for the session in /usr/local/RA_data/FITS
rescale_Tsys
(gain, siggain, Kpam, sigKpam)rescale system temperatures from tipping curve fits
Methods Documentation
-
Tsys_scaling
(weather_data=None, examiner_keys=None, Tatm=250)¶ factors to rescale the system powers or temperatures to K based on FE noise
:param weather_data : consolidated environmental data :type weather_data : dict
:param examiner_keys : keys of files from this date to be included :type examiner_keys : list of int
:param Tatm : air temperature along line of sight :type Tatm : float
-
fit_Tsys_to_airmass
(weather_data=None, examiner_keys=None, Tatm=250, linear=True)¶ Fit tipping curve data implicit in sessions elev and Tsys data
Returns numpy arrays with indices for sig/ref state, subchannel, beam, IF. The first returned value is the zero airmass intercept and the second its standard deviation. The second returned value is K/airmass
:param weather_data : consolidated environmental data :type weather_data : dict
:param examiner_keys : keys of files from this date to be included :type examiner_keys : list of int
:param Tatm : air temperature along line of sight :type Tatm : float
:param linear : use the linear (low tau) approximation :type linear : True
-
get_average
(source='67P_CG_201')¶ Computes average spectrum for a source in the session
Prints r.m.s. noise for each dataset and all datasets together
:param source : source for which averaging is done
-
get_good_weather_data
(examiner_keys=None)¶ Get data from specific datasets for analyzing environmental conditions.
Returns a dict with keys ‘TAMBIENT’, ‘WINDDIRE’, ‘UNIXtime’, ‘TSYS’, ‘HUMIDITY’, ‘PRESSURE’, ‘ELEVATIO’, ‘WINDSPEE’. The data asociated with each key is a dict with numpy array for (SIG state) True and for False. The ‘TSYS’ array has four axes representing:
time index - 0-based sequence in order of matplotlib datenum subchannel - CYCLE value beam - 1-based number sequence IF - 1-based number sequence, usually representing pol
The other keys have only a time axis.
-
get_sources
()¶ Gets a list of sources from all the datasets in the session
-
make_session_names
()¶ creates the directory path to the data from the session
It is crafted from the name of the first FITS file
-
open_datafiles
(datafiles)¶ Opens the files for the session in /usr/local/RA_data/FITS
-
rescale_Tsys
(gain, siggain, Kpam, sigKpam)¶ rescale system temperatures from tipping curve fits