# HAWC Pipeline Base Configuration File - General (public) version # # This file contains all settings for reducing HAWC science and # in-flight diagnostic data. It is intended to be used with # additional delta configuration files. # # DO NOT edit this file without consulting with the HAWC data # reduction team. #### Basic Settings #### #======================= # General Section: configuration of the pipeline [general] # list of packages to look for pipe step modules (order matters) steppacks = hawc, tesdetector, labdiag, drp, tools # list of steps for unknown instrument mode stepslist = StepLoadHAWC, StepDemod # Data Section: information on data objects and file names [data] # Regexp for part of the filename before the file step identifier # - default is '\A.+\.' for all filename before the last '.' including the '.' filenamebegin = '\A.+_' # HAWC+ after Nov 2016: All before the last '_' including the _ #filenamebegin = '\A[A-Z0-9]+_HC_[A-Za-z]+_[A-Za-z0-9]+_[A-Za-z0-9]+_[A-Za-z0-9]+_' # HAWC+ # Regexp for part of the filename after the file step identifier # - default is '\.[A-Za-z0-9]+\Z' for alphanum characters after last '.' filenameend = '\.fits(\.gz)?\Z' # HAWC 1G and HAWC+ after Nov 2016 (.gz is optional) #filenameend = '_\d+\.fits(\.gz)?\Z' # HAWC+ filenum = '(?:\A.*F\d{3,4}_((?:\d+-)?\d+)_.*\.fits(?:\.gz)?\Z)|(?:\AF\d{3,4}_HA.*_((?:\d+-)?\d+)\.fits(?:\.gz)?\Z)' dataobjects = DataFits, DataText #, DataCsv # Pipeline Section: Configuration of the pipeline [pipeline] # Number of final results to save finalsaveN = 1 # Environment variables [envars] # Auxiliary file folder - NEEDS TO BE SET as this will not work for most users HAWC_AUXFOLDER = hawcdrp/pipeline/auxfiles #### PIPE MODES #### #=================== # configuration for individual pipeline modes. Each needs: # - datakeys: List of keyword=values required in file header to select this pipeline mode # Format is: Keyword=Value|Keyword=Value|Keyword=Value # - stepslist: List of pipesteps to run the data through # SKYDIP data [mode_skydip] datakeys = 'INSTCFG=TOTAL_INTENSITY|CALMODE=SKY_DIP' # list of steps stepslist = load, StepCrush, save, load_RAW, StepFluxjump, save, StepPrepare, StepDemod, save, StepSkydip, save # Crush - no output [[crush]] noout=True # Stepprepare change to labmode and get Chop Offset from crioAnalogChopOut [[prepare]] labmode=True colrename = 'crioAnalogChopOut -> Chop Offset|AZ_Error->Azimuth Error|EL_Error->Elevation Error|AZ->Azimuth|EL->Elevation|SIBS_VPA->Array VPA' chpoffsofiaRS = False # Change demodulation options [[demod]] l0method = 'ABS' track_tol = -1 track_extra = 0,0 [[header]] NODPATT = "'A' / Nod Pattern" # POLDIP data [mode_poldip] datakeys = 'INSTCFG=POLARIZATION|CALMODE=SKY_DIP' stepslist = StepNoiseFFT, StepNoisePlots, save, StepPolDip, save # INTCALFLATSALL Intcal mode to make flat files [mode_intcalflats] datakeys ='CALMODE=INT_CAL|CMTFILE=Hawc_DitherChopNod.txt' # list of steps stepslist = load, StepFluxjump, StepPrepare, StepDmdAll, save, StepDmdPlot, StepDmdCut, StepMkflat, save, load_DMA, StepFlat, StepShift, StepSplit, StepCombine, StepNodPolSub, StepStokes, save # Stepprepare change to labmode and get Chop Offset from crioAnalogChopOut [[prepare]] labmode=True colrename = 'crioAnalogChopOut -> Chop Offset|AZ_Error->Azimuth Error|EL_Error->Elevation Error|AZ->Azimuth|EL->Elevation|SIBS_VPA->Array VPA' chpoffsofiaRS = False # Change demodulation options [[dmdall]] l0method = 'RE' phasefile = 0.0 checkhwp = False track_tol = -1 [[dmdcut]] mask_bits = 64 # Flat to ones [[flat]] flatfile = '/data/hawc/Data/DemoAndTest/*/2015*/*bad*' fitkeys = # Change header value NODPATT = A [[header]] NODPATT = "'A' / Nod Pattern" # INTCAL Mode for lab Internal Calibrator File [mode_intcal] datakeys ='CALMODE=INT_CAL' # list of steps stepslist = StepNoiseFFT, StepNoisePlots, save, load_RAW, StepPrepare, StepDmdAll, save, StepDmdCut, StepLabChop, save, load_DMA, StepFlat, save, StepShift, StepSplit, StepCombine, save, StepNodPolSub, save, StepStokes, save # Stepprepare change to labmode and get Chop Offset from crioAnalogChopOut [[prepare]] labmode=True colrename = 'crioAnalogChopOut -> Chop Offset|AZ_Error->Azimuth Error|EL_Error->Elevation Error|AZ->Azimuth|EL->Elevation|SIBS_VPA->Array VPA' chpoffsofiaRS = False # Change demodulation options [[dmdall]] l0method = 'ABS' phasefile = 0.0 track_tol = -1 [[dmdcut]] mask_bits = 68 # Change stepwcs to labmode [[wcs]] labmode=True # Change header value NODPATT = A [[header]] NODPATT = "'A' / Nod Pattern" # NOISE Mode Configuration (catch for other failed files) [mode_noise] datakeys ='DIAGMODE=NOISE' # list of steps stepslist = StepNoiseFFT, StepNoisePlots, save # AUTOFOCUS: Mode for Automatic Focusing for Scan data [mode_autofocus] datakeys = 'CMTFILE=Hawc_AutoFocus.txt' # list of steps stepslist = load, StepDataGroup, save, StepFocus, save # SKYCAL: Sky calibration file [mode_skycal] datakeys='CALMODE=SKY_CAL' # list of steps stepslist = StepNoiseFFT, StepNoisePlots, save # CHOPNOD Mode Configuration [mode_chopnod] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = TOTAL_INTENSITY|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = StepNoiseFFT, StepNoisePlots, save, load_RAW, StepPrepare, StepDemod, save, StepLabChop, save, load_DMD, StepFlat, save, StepShift, StepSplit, StepCombine, save, StepNodPolSub, StepStokes, StepWcs, save, StepOpacity, StepBgSubtract, StepIP, StepRotate, StepMerge, save # Overwrites for stepdemod [[demod]] checkhwp = False # Overwrites for qubgsubtract [[bgsubtract]] qubgsubtract = False # NODPOL mode configuration [mode_nodpol] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = POLARIZATION|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = load, StepFluxjump, StepPrepare, StepDmdAll, save, StepDmdPlot, StepDmdCut, StepFlat, StepShift, StepSplit, StepCombine, StepNodPolSub, StepStokes, StepWcs, save, StepOpacityModel, StepIP, StepRotate, StepBgSubtract, save, StepCalibrate, StepMerge, save, StepInflate, StepPolVec, StepRegion, StepPolMap, save # NODPOL2CAL NodPol mode from RAW to WCS with dmdall and dmdcut [mode_nodpol2cal] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = POLARIZATION|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = load, StepFluxjump, StepPrepare, StepDmdAll, save, StepDmdPlot, StepDmdCut, StepFlat, StepShift, StepSplit, StepCombine, StepNodPolSub, StepStokes, StepWcs, save, StepOpacityModel, StepIP, StepRotate, StepCalibrate, save # NODPOL2MAP NodPol mode from WCS to PolMap [mode_nodpol2map] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = POLARIZATION|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = load, StepBgSubtract, save, StepMerge, save, StepInflate, StepPolVec, StepRegion, StepPolMap, save, StepLIC, save # Nodpol2map with deglitching and error inflation - from CAL files [mode_nodpol2mapdeglitch] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = POLARIZATION|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = load, StepMapDeglitch, StepBgSubtract, StepMerge, save, StepInflate, StepPolVec, StepRegion, StepPolMap, save, StepLIC, save # CHI2 Analysis Nod-Pol Mode Configuration *WCS*.fits files should be used as inputs [mode_chi2] datakeys = "INSTMODE = C2N (NMC)|INSTCFG = POLARIZATION|CMTFILE = Hawc_DitherChopNod.txt" # list of steps stepslist = load, StepBgSubtract, StepMergeBins, StepPolVec, StepRegion, StepPolMap, save, StepChi2, save # SCAN Mode Configuration [mode_scan] datakeys ='INSTMODE=otfmap|INSTCFG=total_intensity' # list of steps #stepslist = StepNoiseFFT, StepNoisePlots, save, load_RAW, StepCrush, save stepslist = StepCrush, save # POINTSCAN Mode Configuration: Just like scan but for point sources [mode_pointscan] datakeys ='INSTMODE=otfmap|INSTCFG=total_intensity' # list of steps #stepslist = StepNoiseFFT, StepNoisePlots, save, load_RAW, StepCrush, save stepslist = StepCrush, save [[crush]] # command line options for crush: add "-point" options = hawc+ -drp -point # Subpipe to reduce data to demodulated [mode_subraw2dmd] datakeys = 'INSTRUME=HAWC_PLUS' # Any file is fine # list of steps stepslist = load, StepFluxjump, StepPrepare, save, StepDemod, save #stepslist = StepNoiseFFT, StepNoisePlots, save, load_RAW, StepFluxjump, StepPrepare, StepDemod, save # Assume substep definitions come from calling pipe # IVC pipeline inputs .txt and outputs .fits [mode_ivc] datakeys = 'NOTES=' # list of steps stepslist = StepIvcLoad, save, StepIvcMerge, save #### PIPE STEPS #### #==================== # First the definitions for the parent steps, then all HAWC steps # in alphabetical order. Finally diagnostic steps. # Parent step configuration [parent] # Sample parameter - no practical use sampar = 0.25 # Parent step Multiple Inputs configuration [parentmi] # Sample parameter - no practical use sampar = 0.5 # Parent step Multiple Outputs configuration [parentmo] # Sample parameter - no practical use sampar = 0.75 # BGSUBTRACT - background subtraction step [bgsubtract] # Pixel size in arcseconds of output map cdelt = 2.57, 4.02, 4.02, 6.93, 9.43 # Projection of output map proj = TAN # Number of iterations of background subtraction with slope term bgslope = 0 # Number of iterations of background subtract with offset (intercept) term bgoffset = 10 # FWHM of gaussian smoothing kernel, in arcseconds fwhm = 2.57, 4.02, 4.02, 6.93, 9.43 # Integration radius for smoothing, in arcseconds. This is the cut-off radius for the smoothing. radius = 2.57, 4.02, 4.02, 6.93, 9.43 chauvenet = True # Use Chauvenet's criterion in background subtraction? fitflag = False # Use errors in intensity when fitting? covflag = False # Use covariances when performing gaussian smoothing? errflag = True # Use uncertainties when computing averages? widowstokesi = True # Use widow pixels (flagged 1 or 2) when smoothing qubgsubtract = True # Apply background offsets to individual Stokes QU files? # CALIBRATE - fluxes from data units to Jy/pixel [calibrate] fac = 0.02650, 0.0, 0.01957, 0.02357, 0.03415 # Multiplicative factor in units of Jy/count/px to convert fluxes to Jy/px (for each band) # CHI2 - analysis step [chi2] pngplots = True colormap = 'inferno' skylim_a = 0.1, 0.6, 0.6 #Thresholds based on Enrique's visit to Northwestern on Feb., 2018 (needs to be changed!) skylim_b = 0.1, 0.6, 0.6 #Thresholds based on Enrique's visit to Northwestern on Feb., 2018 (needs to be changed!) skylim_c = 0.1, 0.6, 0.6 #Thresholds based on Enrique's visit to Northwestern on Feb., 2018 (needs to be changed!) skylim_d = 0.1, 0.6, 0.6 #Thresholds based on Enrique's visit to Northwestern on Feb., 2018 (needs to be changed!) skylim_e = 0.1, 0.6, 0.6 #Thresholds based on Enrique's visit to Northwestern on Feb., 2018 (needs to be changed!) skyvar = 'stki' # COMBINE - R-T and R+T data [combine] sigma = 3.0 # Reject outliers more than this many sigma from the mean sum_sigma = 4.0 # Reject additional R+T outliers more than sum_sigma from the mean covflag = False # Set to False to skip computation of covariances (faster) # CRUSH - Run the crush scan data reduction [crush] # path to CRUSH installation crushpath = 'crush' # command line options for CRUSH options = hawc+ -drp #-tau=0 -final:blacklist=smooth # -bright -final:smooth=10/10/18 # -final:blacklist=smooth # for no smoothing at the end # -tau=0 # for no sky correction # DATAGROUP - Datagroup step, used for focus script to bundle files to merge [datagroup] # data reduction step to use #redstepname = StepMerge redstepname = StepCrush # List of header keywords to decide data group membership: # (| separated list) groupkeys = 'FOCUS_ST' # List of group key formats to force string comparison # (unused if equal "", | separated list) groupkfmt = '%.1f' # Header keyword to re-identify files to avoid re-reducing the same groups # (default is '' indicating all data has to be re-reduced) fileidkey = FILENAME # DEMOD - Demodulate the chopped data [demod] chop_tol = 0.2 # chopper tolerance in arcseconds (not used for sine) nod_tol = 5.0 # nod tolerance in arcseconds hwp_tol = 2. # hwp angle tolerance in degreesc az_tol = 5000000.0 # Azimuth error tolerance in arcseconds el_tol = 5000000.0 # Elevation error tolerance in arcseconds samp_tol = 50.0 # Sample tolerance as a percentage. High and low chop states must have a difference in number of samples less than this value.(not used for sine) track_tol = 'centroidexp' # Track error tolerance in arcseconds (AOIs 3 and 4) - set negative to deactivate track_extra = 0, 0 # Extra samples removed (in seconds) before and after samples flagged by track_tol mode = sine # Demodulation mode. Options are sqr and sine chopphase = True # Flag requiring chop phase correction (not used for sqr) skyflag = False # Flag to control whether sky noise is computed checkhwp = True # Set FALSE to avoid check expected number of HWP angles phasefile = $HAWC_AUXFOLDER/masterphase_170307.fits l0method = 'RE' # Method to normalize data: REal, IMag and ABSolute (default = NO) highfilter = 0.0 # Highpass Filter boxfilter = -1 # Box Highpass Filter. -1 = frequency from the header chopavg = True # Flag to save chop averaged raw data (default = False) filtersave = False # Flag to save filtered data (default = False) tracksampcut = 0.5 # If fraction of all samples removed due to tracking is larger than this number, than tracking status is BAD # DMDALL - Demodulate the chopped data while keeping all samples [dmdall] chop_tol = 0.2 # chopper tolerance in arcseconds (not used for sine) nod_tol = 5.0 # nod tolerance in arcseconds hwp_tol = 2. # hwp angle tolerance in degreesc az_tol = 5000000.0 # Azimuth error tolerance in arcseconds el_tol = 5000000.0 # Elevation error tolerance in arcseconds samp_tol = 50.0 # Sample tolerance as a percentage. High and low chop states must have a difference in number of samples less than this value.(not used for sine) track_tol = 'centroidexp' # Track error tolerance in arcseconds (AOIs 3 and 4) - set negative to deactivate track_extra = 0, 0 # Extra samples removed (in seconds) before and after samples flagged by track_tol mode = sine # Demodulation mode. Options are sqr and sine chopphase = True # Flag requiring chop phase correction (not used for sqr) skyflag = False # Flag to control whether sky noise is computed checkhwp = True # Set FALSE to avoid check expected number of HWP angles phasefile = $HAWC_AUXFOLDER/masterphase_170307.fits l0method = 'RE' # Method to normalize data: REal, IMag and ABSolute (default = NO) highfilter = 0.0 # Highpass Filter boxfilter = -1 # Box Highpass Filter. -1 = frequency from the header chopavg = True # Flag to save chop averaged raw data (default = False) filtersave = False # Flag to save filtered data (default = False) tracksampcut = 0.5 # If fraction of all samples removed due to tracking is larger than this number, than tracking status is BAD # DMDCUT - Discard chops based from the DmdAll output [dmdcut] mask_bits = 1023 # bits of 'Chop Mask' on which to discard chops min_samples = 1 # minimum number of samples for retaining a chop # DMDPLOT - Plot output of DmdAll [dmdplot] door_threshold = 2.0 # ratio of imaginary to real median stds for door vignetting detector_i = 14 # i-location of detector pixel to plot detector_j = 24 # j-location of detector pixel to plot data_sigma = 5.0 # value for sigma-clipping of detector data data_iters = 3 # number of iterations for data clipping user_freq = 10.2 # INT_CAL: user frequency in Hz ref_phase_file = $HAWC_AUXFOLDER/refphases_180419.fits # path to reference phase file in degrees (0.0 is none) phase_thresh = 50.0 # threshold in phase uncertainty (deg) for blanking pixels save_phase = 0 # Save phase images to PHS suffix savefolder = '/data/hawc/Data/Nest_Reduced/TrackingPlots' # Folder to save plots to. '' means same as input file # FLAT - step configuration [flat] # filename glob to find the flat files flatfile = ./*OFT.fits # list of keys that need to match flat and data file (only if flatfile=search) flatfitkeys = 'SPECTEL1', 'MISSN-ID', 'FILEGPID', 'SCRIPTID' # list of input file datasets to flatten # - Expects None or a list of image HDU or table column names datalist = R array, T array # method to normalize data (standard is NO, options are NO, RE, IM and ABS) l0method = NO # additional data from the flat file to add to the reduced data addfromfile = R BAD PIXEL MASK, T BAD PIXEL MASK # Back up filename for auxiliary file(s). Can contain * and ? wildcards to match # multiple files to be selected using fitkeys (default = bkupflatfile/*.fits) #bkupflat = ./*.fits # leave out for default # FLUXJUMP - Flux Jump step configuration [fluxjump] # Filepathname specifying the jump gap map, alternatively a number for the # gap to be used for all pixels (default = '4600') # Note: Use StepFluxjump on FS12 and FS13. No use StepFluxjump on FS14. jumpmap = $HAWC_AUXFOLDER/2017FluxJumps/FluxjumpFS14Columns.fits # FOCUS - step configuration [focus] widowisgood = True # Include widow pixels in the analysis (T) or only good pixels (F, will assume widow pixels are bad) medianaverage = True # Run a median average box through the array to fill bad pixels (T) or not (F) boxaverage = 5 # Size of the median average box (if medianaverage is True) in pixels autocrop = True # Crop image automatically around the target (w/ boxsize = 1/3 of image size) cropimage = True # Crop portion (box) of the image for analysis? True or False xyboxcent = 87,87 # If cropimage = True, central X/Y pixel position of the box to be cropped boxsizecrop = 30 # If cropimage = True, size of the box to be cropped (in pixels) primaryimg = '' # Specifies which image will be used for the Gaussian fit. If left blank, the first image will be used. # Error inflation based on Chi2 Analysis [inflate] inflate_a = 1.29,1.24,1.24 # inflate Band A errors in i,q,u by this factor if txt file with excess noise is not found in foldchi2 inflate_b = 1.28,1.29,1.29 # inflate Band B errors in i,q,u by this factor if txt file with excess noise is not found in foldchi2 inflate_c = 1.25,1.30,1.30 # inflate Band C errors in i,q,u by this factor if txt file with excess noise is not found in foldchi2 inflate_d = 1.41,1.29,1.29 # inflate Band D errors in i,q,u by this factor if txt file with excess noise is not found in foldchi2 inflate_e = 1.27,1.31,1.31 # inflate Band E errors in i,q,u by this factor if txt file with excess noise is not found in foldchi2 foldchi2 = '' # Folder with txt files from chi2 analysis # IP Correction for instrumental polarization step configuration [ip] #IP from planets estimated using FS13. qinst = -0.0154, 0.0, -0.0151, 0.0028, -0.0129 # Fractional instrumental polarization in q uinst = -0.0030, 0.0, 0.0090, 0.0191, -0.0111 # Fractional instrumental polarization in u fileip = $HAWC_AUXFOLDER/hawc_ip_FS15_poldip_v1.fits # Line Intergral Convolution step configuration [lic] filetype = 'png' # Type of file to output. Supported formats: eps, pdf, pgf, png, ps, raw, rgba, svg, svgz calc_lic = True # Calculate the LIC? The LIC must have been previous calculated and the fits file that was outputted must be used as datain. Note that the bgimage, rebin, polepol, croppolepol, and showbin will be the parameters that were used to create the original (T/F) show_beam = True # Show beam size? (T/F) bg_image = '' # CALC_LIC MUST BE TRUE to supply a background image. Use an empty string to make an intensity map with the HAWC data. rebin = 10 # Rebinning factor for the final image colormap = 'viridis' # Colormap to be used (i.e. 'planck', 'viridis', 'inferno') rotated = True # Use 90-deg rotated pol data? (T/F) croppolepol = True # Mask out map areas with P/sigP < polepol? (T/F) showmap = False # Show color map in masked out areas with P/sigP < polepol? (T/F) polepol = 3.0 # Value of polepol to be used for the masking. pol > (polepol)epol. NOTE THAT THE POLEPOL IN THE SUBTITLE IS THE ONE USED TO PLOT POLARIZATION VECTORS,(if ploting pol vectors, otherwise, ignore this) WHICH COMES FROM CALCULATIONS DONE IN STEPREGIONS. IF PUBLISHING, ENSURE THESE NUMBERS ARE THE SAME. #centercrop = 275.097,-16.2105,0.0385,0.040 # Center and crop at specific coordinates, e.g. [275.097,-16.2105,0.0385,0.040] or an empty list [] to not center crop. Values are RA center (deg), DEC center (deg), Width (deg), Height (deg) lowhighscale = 'automatic' # Contrast adjustment. Use [low,high] or "automatic" alphalic = 0.6 # Transparency level for the lic overlay (0.5-0.7 generally). add_contours = False # Add contours to the map? (T/F) add_streamplots = False # Add streamplots? (T/F) hide_axis = False # Hide graph axis? (T/F)']) polvec = False # Plot polarization vectors? (T/F). If F, remaining parameters irrelevant. scalevec = 0.0005 # Scale factor for vector sizes. scale = True # Set to False to make all vectors the same length debias = True # Use debiased polarizations colorvec = 'red' # Pol Vector color less_vec = 1 # Removes 1/n vectors. filenameout = '' # Filename for the licmap. Leave as an empty string to automatically generate a filename. title = '' # Title, pulled from the fits header if given an empty string. subtitle = '' # Subtitle, pulled from the fits header if given an empty string. # Map-based deglitching [mapdeglitch] cdelt = 2.42,3.90,3.90,6.80,9.10 # Pixel size in arcseconds of output map proj = TAN # Projection of output map I_thresh = 3.0 # deglitching threshold for Stokes I QU_thresh = 3.0 # deglitching threshold for Stokes Q & U minsamp = 20 # minimum number of samples to use in deglitch ing gridangle = -89.69,0.0,-104.28,37.42,119.62 # Angle of the grid in degrees (for each waveband) rotpolFlag = 1 # flag for Q, U deglitching coord. (1 = instrument, 0 = sky) widowstokesi = True # Use widow pixels (flagged 1 or 2) I_nan_thresh = 2 # mask threshold for inserting NaNs into Stokes I nan_thresh = 0 # mask threshold for inserting NaNs saveDiagnostic = 1 # save diagnostic product # Parameter as used by FABIO for RhoOphA #I_thresh = 4.0 # More conservative value for less deglitching #QU_thresh = 4.0 # More conservative value for less deglitching # MERGE - step configuration [merge] cdelt = 1.21, 1.95, 1.95, 3.40, 4.55 # Pixel size in arcseconds of output map. celt = beamsize/4. proj = TAN # Projection of output map fwhm = 2.57, 4.02, 4.02, 6.93, 9.43 # FWHM of gaussian smoothing kernel, in arcseconds radius = 2.57, 4.02, 4.02, 6.93, 9.43 # Integration radius for smoothing, in arcseconds. This is the cut-off radius for the smoothing. covflag = False # Use covariances when performing gaussian smoothing? errflag = True # Use uncertainties when computing averages? widowstokesi = True # Use widow pixels (flagged 1 or 2) to compute Stokes I map conserveflux = True # Apply flux conservation factor (due to change in pixel size) to all output images minnpix = 0. # Output image will show only regions with sampling density larger than minnpix. Useful to remove bad borders. fluxthreshold = 5.4, -1.0, 1.0, 0.14, 0.1 # Flux threshold level for treatment of bright pixels # MERGEBINS - Merging step for Chi2 analysis [mergebins] groups = scriptid # MKFLAT - Make flat file from INT_CAL files [mkflat] # Path for the folder to write flat files to (default: .) flatoutfolder = "" # Header Keyword to match input files to the same observation (default: FILEGPID) groupkey = "SCRIPTID" # Chops to exclude from the beginning of the file (default: 1) skip_start = 1 # Chops to exclude from the end of the file (default: 1) skip_end = 1 # Raw data threshold for dead pixels (default: 10.0) bad_dead = 10.0 # Raw data threshold for ramping pixels (default: 2000000.0) bad_ramping = 2000000 # Threshold for HIGH STD of DMD SIGNAL to exclude pixels (default: 10.0) normstd = 10.0 # Threshold to eliminate pixels with LOW SIGNAL (default: [0.5, 0.5, 0.5]) ynormlowlim = 0.5, 0.5, 0.5 # Threshold to eliminate pixels with HIGH NORMALIZED SIGNAL # (default: [10.0, 10.0, 10.0]) ynormhighlim = 10.0, 10.0, 10.0 # Scale factor for T/R flatfield (default: 2.0) TtoR = 2.0 # Filename for auxiliary file(s). Can contain * and ? wildcards to match # multiple files to be selected using fitkeys (default = skycal/*.fits) # (default: skycal/*SCAL.fits) scalfile = '$HAWC_AUXFOLDER/SkyCals/sflat*_v0.fits' # Back up filename for auxiliary file(s). Can contain * and ? wildcards # to match multiple files to be selected using fitkeys # (default = bkupskycal/*.fits) bkupscal = /*.fits # List of header keys that need to match auxiliary data file # - only used if multiple files match skycal (default = []) scalfitkeys = SPECTEL1 # NODPOLSUB - Subtract L and R nods with HWP configuration [nodpolsub] # OPACITYMODEL - Correction for model atmospheric opacity step configuration [opacitymodel] respfolder = $HAWC_AUXFOLDER/response fittype = alt za_ref = 45.0 alt_ref = 41000 pwv_ref = 7.3 # POLMAP - Polarization map step [polmap] mapfile = 'same' # Alternative fits file name for background image. ‘same’: matches the background and pol. files. If other background image wants to be used then the input is the filename. maphdu = 'STOKES I' # HDU name to be used in the mapfile. The HDU used for the background image. scalevec = 0.0003 # Scale factor for vector sizes scale = True # Set to False to make all vectors the same length rotate = True # True gives (B-Field) vectors debias = True # Use debiased polarizations lowhighscale = 'automatic' # Low/High values for image scaling - set automatic or [low,high] colorvec = 'black' # Vector colors colormap = 'rainbow' colorcontour = 'gray' uselatex = True fillcontours = True # ncontours = 30 # Number of contours title = 'info' # Title in the polarization map subtitle = 'cuts' # subtitle centercrop = False # Crop a region of the image. Default = False. Inputs: RA, DEC, width, height in degrees. # POLVEC - Polarization vector step configuration [polvec] # telescope polarization efficiency eff = 0.842, 0.9, 0.939, 0.975, 0.978 # PLOTS - make plots from tabular data [plots] # Folder to save plots to. '' means same as input file savefolder = '' # List with names of columns to plot columns = 'RA', 'Dec', 'TrackErrAoi3', 'TrackErrAoi4', 'CentroidExpMsec', 'Phase Corr', 'HWP Angle', 'Nod Index', 'HWP Index' # PREPARE - Prepare file for demodulation [prepare] detcounts = 'SQ1Feedback'# Name of the column containing the detector flux values R/T arrays hwpcounts = 'hwpCounts' # Name of the input fits column containing the HWP counts (only used if column "HWP Angle" is not present) hwpconv = 0.25 # Value to convert hwpcounts to HWP Angles (only used if column "HWP Angle" is not present) labmode = False # If TRUE (processing lab data), will fill in with zeros a few columns and keywords that are important for the DRP replacenod = True # If TRUE will replace Nod Offset by calculation based on RA/DEC. If False use original column (has problems) chpoffsofiaRS = True # If TRUE will calculate Chop Offset based on SofiaChopR/S. If False the user should use colrename to specify which column to use colrename = 'AZ_Error->Azimuth Error|EL_Error->Elevation Error|AZ->Azimuth|EL->Elevation|SIBS_VPA->Array VPA|NOD_OFF->Nod Offset Orig' # List of data columns to delete: The format ["column1","column2",...] coldelete = hwpA,hwpB,FluxJumps # Multiply raw data by (-1) to correct for negative Stokes I image (default is False) multiplyminusone = False # Number of samples to shift the data (default is 0 i.e. no shift) traceshift = 0 #4 # List for PIXCAL values for each band - to update PIXSCAL in the header pixscalist = 2.57, 4.02, 4.02, 6.93, 9.43 badfileslist = '$HAWC_AUXFOLDER/badfileslist.txt' # Remove data Dropouts (i.e. data with RA==Dec==0) removedropouts = True # REGION - Extract ds9 region file of polarization vectors [region] mode = '' #Use an empty string to get Ra and Dec and "pixcoords" to get pixel coords skip = 2 # Only plot every ith pixel. If skip =1 it will show every pixel. If cdelt = beamsize/4, skip=2 gives Nyquist sampling. scale = True # Set to False to make all vectors the same length. Only for ds9 rotate = False # Use rotated (B-Field) vectors. Only for ds9 debias = True # Use debiased polarizations. Only for ds9 length = 0.02 # Scale factor for length of polarization vectors in pixels (should be ~10 for pixcords, ~0.1 for ra and dec). only for ds9 mini = 0.01 # Do not plot vectors with flux < this fraction of peak flux minp = 0.0 # Require percentage polarizations to be >= this value offset = 0, 0 # Offset in pixels in x,y (controls which pixels are extracted) sigma = 3.0 # p/sigmap must be >= this value minisigi = 10 # StokesI/ErrorI must be above this value maxp = 50 # Pol. Degree must be below this value # ROTATE - Rotate Q and U from detector to sky frame step configuration [rotate] gridangle = -89.69, 0.0, -104.28, 37.42, 119.62 #Angle of the grid in degrees (for each waveband) hwpzero_tol = 3.0 # Tolerance in the difference between commanded and actual initial HWP angles hwpzero_option = 'commanded' # Option to use between "commanded" or "actual" in case the difference between the initial HWP angles is > hwpzero_tol # SHIFT - Account for R/T misalignment and apply integer displacements (shifts) [shift] angle1 = 0.0 # rotation angle of R1 relative to T1, in degrees counterclockwise angle2 = 0.0 # rotation angle of R2 relative to T2, in degrees counterclockwise mag = 1.0, 1.0 # Magnification of R relative to T, in the x,y pixel direction disp1 = 0.0, 0.0 # Pixel displacement of R1 relative to T1, in the x,y directions disp2 = 0.0, 0.0 # Pixel displacement of R2 relative to T2, in the x,y directions gapx = 4.0 # displacement in x pixels between T1 and T2 gapy = 0.0 # displacement in y pixels between T1 and T2 gapangle = 0.0 # Rotation angle in degrees CCW between T1 and T2 # SPLIT - Split data by HWP angle and nod position step configuration [split] # Nod tolerance, as the percent difference allowed in number of chop cycles # between 1st and 2nd left, and between left and right nod_tol = 50.0 # STOKES - Compute Stokes I, Q, U step configuration [stokes] hwp_tol = 5.0 # HWP angles for Stokes parameters must differ by no more than 45+-hwp_tol degrees erri = median # How to inflate errors in I. Can be median, mean, or none. — Test with mean & none erripolmethod = meansigma # Options are "hwpstddev" or "meansigma" removeR1stokesi = True # Remove R1 subarray for Stokes I method = 'pairs' # Method to obtain Stokes Q and U. Can be pairs or fit polthetamaps = True # Compute preliminary polarization degree and angle maps # SUBPIPE - runs a pipeline as external process [subpipe] # Pipeconf file to run subpipe. Default is '' i.e. use self.config pipeconf = '' # Pipeline mode to run subpipe pipemode = subraw2dmd # WCS - Update Parallactic angle and crval1 and crval2 for a single file [wcs] add180vpa = True # Add 180 degrees to the SIBS_VPA # Small Offset (in pixels along x/y) between SIBS_X/Y and actual target position offsibs_x = 0.0, 0.0, 0.0, 0.0, 0.0 offsibs_y = 0.0, 0.0, 0.0, 0.0, 0.0 labmode = False # If labmode = True, will ignore keywords and input parameters and create fake astrometry # LOGSOCKET - logging configuration [logsocket] # host host = 'localhost' # port SOfia 747 port = 50747 # default logger deflogger = 'pipe.logsocket' #### Lab and Diagnostic Steps #### #================================= # NOISEFFT - step configuration [noisefft] # IDL Executable path idlexec = 'idl' # Path to HAWC IDL functions idlpath = 'hawcdrp/pipeline/src/tesdetector/idl' # List of IDL files to compile tocompile = 'hawcp_powspec.pro' # String for hawc_i command (with placeholders for infname and outfname) runcmd = "hawcp_powspec, '%s', '%s', /noplots, /truncate" # NOISEPLOTS - step configuration [noiseplots] # Option for using old data format (for use with hawc_i) oldformat = False # 1 / fraction of pixels to show for detailed pixels plots # (plotn=1 for showing all pixels, plotn=4 for showing everying fourth) plotn = 8 # IVCLOAD - step configuration [ivcload] # IDL Executable path idlexec = 'idl' # Path to HAWC IDL functions codepath = 'hawcdrp/pipeline/src/tesdetector/ivc' idlpath = 'hawcdrp/pipeline/src/tesdetector/idl' # IVCMERGE step configuration [ivcmerge] #### Data Section #### #===================== # Treatement of the FITS header: can include keyword replacement # The keyword value and comment must be printed as they would in a FITS header # If the value is another keyword, the value of that keyword will be used # instead (This only works if the other keywords starts with an alphabetic # character). [header] #INSTMODE = "'test' / instrument mode" #CHPFREQ = "10.0 / Chop Frequency" #SKYANGL = 0.0 / Sky Angle #CHOPPING = T / Chopping flag #CHPMODE = "'2-POINT' / Chopping mode" #CHPAMP1 = 30000 / Chop Amplitude #CHPANGLE = 0.0 / Chop Angle #DETSIZE = "'(32,41)'" #NHWP = "1 / Number of HWP angles" #NODDING = T / Nodding flag #NODANGLE = 92.8 / Nod Angle #NODPATT = "'ABBA' / Nod Pattern" #NODTIME = 5.0 / Nod Integration Time #NODSETL = 0.05 / Nod Settle Time #OBSRA = 5000 / Observation RA (now DOG units) #OBSDEC = 5000 / Observation DEC (now DOG units) #SCANNING = T / Scanning flag TAUOBS = 0.0 / Estimated optical depth # Merge Header Section: How to merge header keywords when headers from # several files are merged. Options are: # - FIRST (default), LAST: For all values # - MIN, MAX, SUM: For numbers # - AND, OR: For boolean flags [headmerge] ALTI_STA = FIRST ALTI_END = LAST LAT_STA = FIRST LAT_END = LAST LON_STA = FIRST LON_END = LAST FOCUS_ST = FIRST FOCUS_EN = LAST ZA_START = FIRST ZA_END = LAST TRACERR = OR # Treatement for table values when combining images # Options are MIN, MED, AVG, FIRST, LAST, SUM [table] samples = SUM chop offset = WTAVG nod offset = WTAVG hwp angle = WTAVG azimuth = WTAVG azimuth error = WTAVG elevation = WTAVG elevation error = WTAVG array vpa = WTAVG nod index = WTAVG hwp index = WTAVG nod offset orig = FIRST framecounter = FIRST crioframenum = WTAVG hwpcounts = WTAVG fasthwpa = WTAVG fasthwpb = WTAVG fasthwpcounts = WTAVG a2a = WTAVG a2b = WTAVG b2a = WTAVG b2b = WTAVG chop1 = WTAVG chop2 = WTAVG criottlchopout = FIRST sofiachops = WTAVG sofiachopr = WTAVG sofiachopsync = WTAVG ai22 = MED ai23 = MED crioanalogchopout = FIRST irigupdatediff = FIRST timestamp = WTAVG ra = FIRST dec = FIRST chop_vpa = FIRST lon = FIRST lat = FIRST lst = WTAVG los = WTAVG xel = WTAVG tabs_vpa = FIRST pitch = WTAVG roll = WTAVG nonsiderealra = WTAVG nonsiderealdec = WTAVG flag = WTAVG pwv = FIRST nodpositionreached = FIRST trackerraoi3 = FIRST trackerraoi4 = FIRST trackerraoi5 = FIRST r array imag = FIRST t array imag = FIRST chop offset imag = FIRST r array avg = FIRST t array avg = FIRST phase corr = WTAVG nod_off = WTAVG centroidexpmsec = WTAVG # Centroid Values for FS15 centroidworkphase = WTAVG centroidaoi = FIRST # SofiaHK values (temporary) sofhkchopamp = WTAVG sofhkbinning = WTAVG sofhkaoi4col = WTAVG sofhkaoi4row = WTAVG sofhkaoi3col = WTAVG sofhkaoi3row = WTAVG sofhktrkaoi = WTAVG sofhkseqphase = WTAVG sofhkexptime = WTAVG sofhkaoi4err = WTAVG sofhkaoi3err = WTAVG chop mask = FIRST