- class agpy.pyflagger.Flagger(filename, debug=False, npca=13, **kwargs)[source]¶
Write out a file with appropriate flagging commands for use in IDL / later editing Example:
import pyflagger f = pyflagger.Flagger(‘050906_o11_raw_ds5.nc_indiv13pca_timestream00.fits’,‘050906_o11_raw_ds5.nc’) f.plotscan(0) f.close()- Key commands:
- left click - flag right click - unflag n - next scan p - previous scan q - save and quit Q - quit (no save) . - point to this point in the map f - plot footprint of array at this time point R - reverse order of flag boxes (to delete things hiding on the bottom) r - redraw d - delete flag box t - flag timepoint s - flag scan w - flag Whole scan (this is the same as s, except some python backends catch / steal ‘s’) S - unflag scan b - flag bolometer T - unflag timepoint B - unflag bolometer c - toggle current scan v - display data value P - display the PCA decomposition of the displayed timestream o - make a map of the array at the sampled time z - display the power spectra of the displayed timestream (use ‘C’ to plot one) Z - display the power spectra of the displayed timestream over all time C,L - plot Column/Line j - plot whole timestream for selected bolo a - create a footprint movie between two selected points M,m - flag highest, lowest point in map
- Map Key Commands:
- c - toggle current scan . - show point in timestream click - show point in timestream middle click - list all points that contribute to that pixel r - redraw
- broken_expfit(bolonum=0, plbreak=2.5, doplot=True, logx=False, replotspec=True, defaultplot=False, **kwargs)[source]¶
Fit two exponentials (one most likely flat) to the power spectrum Ignore frequencies < 0.02 Hz, as these are filtered out by the AC sampler
- close(write=True)[source]¶
close the ncdf file and the graphics windows and flush everything to file
- compute_map(ts=None, tsname=None, weights=None, showmap=True, **kwargs)[source]¶
Create a map from the data and potentially show it
- ordered_timestreams(ordertype='astro', clear=True, colors=['black', 'purple', 'blue', 'cyan', 'green', 'orange', 'red', 'magenta'], astro_order=['ac_bolos', 'atmo_one', 'atmo_one_itermedian', 'atmos_remainder', 'PCA_astro', 'astrosignal'], atmo_order=['ac_bolos', 'atmo_one', 'expmodel', 'first_sky', 'PCA_atmo', 'PCA_astro', 'noise'], dolegend=True, dosubplots=True, fignum=4, **kwargs)¶
Plot the timestreams in the order they’re produced during data reduction
ordertype - ‘astro’ or ‘atmo’
- set_tsplot(tsplot=None)[source]¶
Options: set tsplot equal to one of these strings default = skysub (atmo_one-atmosphere+astrosignal) default_noscale (ac_bolos-atmo_one-atmosphere) residual (atmo_one-atmosphere-noise) last_astrosignal (atmo_one-atmosphere-noise+astrosignal) astrosignal dcbolos acbolos acbolos_noscale atmosphere default_noscale scale raw rawscaled noise zeromedian