lib.QdataHandling module

class lib.QdataHandling.BeamMapsAnalysis(a)[source]

Bases: object

This class allows to make the same things that in Sample_demodulation.Rmd. It generates raw data and make all the analysis to obtain beam maps.

Methods

demodulation

filter_data

fullanalysis

make_flat_map

make_healpix_map

remove_noise

save_azel_mymap

save_azel_mymap_hp

demodulation(tt, data, remove_noise)[source]
filter_data(tt, data, lowcut, highcut, doplot=False)[source]
fullanalysis(number_of_tes=None, filter=None, demod=False, remove_noise=True, make_maps='healpix', doplot=True, save=False)[source]
make_flat_map(tt, data, doplot=False)[source]
make_healpix_map(azt, elt, tod, countcut=0)[source]
remove_noise(tt, tod)[source]
save_azel_mymap(mymap, TESNum)[source]
save_azel_mymap_hp(mymap, TESNum)[source]
class lib.QdataHandling.DirtyMaps(a)[source]

Bases: object

Methods

make_healpix_map_radec(d, st[, elmin, ...])

This function allow to create healpix map in RADEC coordinates.

filter_data

make_flat_map

make_healpix_map

remove_noise

filter_data(d, lowcut, highcut, order=5)[source]
make_flat_map(d)[source]
make_healpix_map(d, elmin=30, elmax=50, countcut=0)[source]
make_healpix_map_radec(d, st, elmin=30, elmax=50, countcut=0, latitude=-24.731358, longitude=-65.409535)[source]
This function allow to create healpix map in RADEC coordinates.
  • d is your TOD

  • st is the date when the observation started (exemple : st = ‘2022-07-14 23:54:19.113000’)

  • latitude and longitude are set to be in Salta lab

remove_noise(d)[source]
lib.QdataHandling.cut_tod(tod, azt, elt, t, elmin=30, elmax=50)[source]
lib.QdataHandling.display_healpix_map(maps, rot, q, reso=15, add_moon_traj=None, savepdf=None, radec=['G'], good=None, **kwargs)[source]
lib.QdataHandling.get_mode(y, nbinsmin=51)[source]
lib.QdataHandling.hf_noise_estimate(tt, dd)[source]
lib.QdataHandling.identify_scans(thk, az, el, tt=None, median_size=101, thr_speedmin=0.1, doplot=False, plotrange=[0, 1000])[source]
This function identifies and assign numbers the various regions of a back-and-forth scanning using the housepkeeping time, az, el
  • a numbering for each back & forth scan

  • a region to remove at the end of each scan (bad data due to FLL reset, slowingg down of the moiunt, possibly HWP rotation

  • is the scan back or forth ?

It optionnaly iinterpolate this information to the TOD sampling iif provided. :param input: :type thk: :param thk: time samples (seconds) for az and el at the housekeeeping sampling rate :type thk: np.array() :type az: :param az: azimuth in degrees at the housekeeping sampling rate :type az: np.array() :type el: :param el: elevation in degrees at the housekeeping sampling rate :type el: np.array() :type tt: :param tt: None buy default, if not None:

time samples (seconds) at the TOD sampling rate Then. the output will also containe az,el and scantype interpolated at TOD sampling rate

Parameters:
  • thr_speedmin (Optional : float) – Threshold for angular velocity to be considered as slow

  • doplot ([Optional] : Boolean) – If True displays some useeful plot

  • output

  • scantype_hk (np.array(int)) – type of scan for each sample at housekeeping sampling rate: * 0 = speed to slow - Bad data * n = scanning towards positive azimuth * -n = scanning towards negative azimuth where n is the scan number (starting at 1)

  • azt ([optional] np.array()) – azimuth (degrees) at the TOD sampling rate

  • elt ([optional] np.array()) – elevation (degrees) at the TOD sampling rate

  • scantype ([optiona] np.array()) – same as scantype_hk, but interpolated at TOD sampling rate

lib.QdataHandling.plot_data_on_FP(datain, q, lim=None, savepdf=None, **kwargs)[source]

Parameters :

  • datain : array -> The data that you want to plot on the focal plane. The data must have the shape (N_tes x N_data) for 1D plot or (N_tes x N_data x N_data) for 2D plot. In case one wants to plot multiple 1D plots then data_in is a list of data arrays

  • q : object -> object of qubic computing with qubic package

  • xdataarray (or array of arrays) -> for 1D plot, you can give x axis for the plot. Default is xdata = []. If one wants to plot more than

    one curve then xdata is an array of arrays

  • lim : array -> have the shape [x_min, x_max, y_min, y_max] if you want to put limit on axis

  • savepdf : str -> Put the name of the file if you want to save the plot

  • string or array of strings specifying the plot style

  • **kwargs : -> You can put severals arguments to modify the plot (color, linestyle, …).