# Namelist to mosaic 2d versions of IRAC subarray data
#
# Assumes that images are listed in image.list and the 
# uncertainties are listed in sigma.list
#
# In the basic version, no imasks/dmasks are used as the sigma clipping
# is assumed to remove bad data, but the pmask is still used.  No outlier 
# rejection is performed as radhits should have been rejected directly off 
# of the pixel stack.
#
run_medfilter = 0
run_detect_radhit = 0
# Use the uncertainties formed from the variance of the subarray cubes
have_uncertainties = 1
compute_uncertainties_internally = 0
run_fiducial_image_frame = 1
run_mosaic_geom = 0
run_mosaic_interp = 1
run_detect_outlier = 0
run_mosaic_proj = 0
run_mosaic_covg = 0
run_mosaic_dual_outlier = 0
run_level = 0
run_mosaic_outlier = 0
run_mosaic_rmask = 0
run_mosaic_reinterp = 0
run_mosaic_coadder = 1
run_mosaic_combiner = 1
run_mosaic_medfilter = 0

NICE = 0
verbose = 1
delete_intermediate_files = 0
save_namelist = 1
overwrite_dmask  = 0
keep_coadded_tiles = 1
create_std_mosaic = 1

USE_OUTLIER_FOR_RMASK = 0
USE_DUAL_OUTLIER_FOR_RMASK = 0
USE_REFINED_POINTING = 0
sigma_weighted_coadd = 0

# Change pixel size as desired currently 1.2 arcseconds
MOSAIC_PIXEL_SIZE_X = -0.000333333
MOSAIC_PIXEL_SIZE_Y = 0.000333333

# Modify output directory as desired
OUTPUT_DIR = mosaic

IMAGE_STACK_FILE_NAME = EDIT_filename
SIGMALIST_FILE_NAME = EDIT_filename
#DCE_STATUS_MASK_LIST = 
# Should use the appropriate subarray mask
PMASK_FILE_NAME =  cal/chan1_subarray_mar04_pmask_flip.fits

# Only need to pmask for 2d subarray data
DCE_Status_Mask_Fatal_BitPattern = 0
PMask_Fatal_BitPattern =  18304
RMask_Fatal_BitPattern = 0

 &FIDUCIALIMAGEFRAMEIN
#   Edge_Padding is given in terms of pixels,
   Edge_Padding = 5,
   CROTA2 = A,
 &END

&MOSAICINTIN 
# INTERP_METHOD = 1(default), 2(Drizzle),3(Grid),
   INTERP_METHOD = 1,
# used by Drizzle,
   DRIZ_FAC = 0.8,
# used by Grid,
   GRID_RATIO = 2,
&END

&MOSAICPROJIN
&END

&MOSAICCOVGIN
   TILEMAX_X = 1000, 
   TILEMAX_Y = 1000, 
&END

&MOSAICCOADDIN
   TILEMAX_X = 1000, 
   TILEMAX_Y = 1000, 
&END
