3) sourcesub.py
sourcesub.py first look query for images to put sources into. It will then loop through all images available and then search for any templates that have already been made for that image's specific SEATiDE object. If no object has been found, it will try to make a new template. If there are no images available to make into templates, it will skip the image. It will then create a fake source in the image and create the target image. The psf of the target image will be created and cosmic ray rejection will be run. The program will then subtract the target and the template images and do photometry on the subtracted image. The magnitude of the subtracted source will be stored in a column called diffmag in magcomparison, and the input magnitude will be stored in a column called inmag.
Query Arguments:
-e, -epoch YYYYMMDD-YYYYMMDD
This argument specifies the range of dates, date, or all dates(by not
choosing one) of the images you want to use to create e93s.
-n, --name OBJNAME
This argument specifies the object name of the images you want to make into e93s
--tempdate YYYYMMDD
This argument allows you to specify a specific date for the template.
Without the argument, the earliest template will be chosen.
--temptel TEMPTEL
This argument allows you to specify the instrument of the template images. The default is fl.
Image Outcome Manipulation Arguments:
-m, --magnitude MAGLIST
Enter any number of magnitudes to be used to create fake sources for the
e93s. If option not chosen, items in np.arange(14, 20, 0.5) will be
used for magnitudes.
-F, --force
By default, the program will avoid processing on images where a row
already exists for a specific filename and input magnitude. Selecting
this argument will force the program to run on all specified images and
magnitudes.
-o, --optimal
By default, the program will run hotpants image subtraction.
Selecting this argument will change the subtraction to use David's
difference imaging program OptimalSub.py
PSF Editing Arguments:
I suggest using these options after data has already been put into magcomparison, and should mostly be used to redo data if it is an outlier.
-r, --redo
When selected, this will redo all the photometry on the target e91
images where the diffmag in magcomparison is defined as an outlier or is
9999.
-s, --show
When selected, this will show psf fitting in the psf stage of
photometry. This will show on both template and target images. Make sure
to have the same fwhm for the target e91 and e93.
-f, --fwhm
This fwhm will be used to create the psf for the e93 image before
subtraction. However, it will also be used on the e91 target image if
--redo is selected. If --show is selected, make sure that the fwhm is
the same for both, for the best results.
--tempfwhm
This argument is used to specify the fwhm for the template images.
If a template does exist, the psf stage will only be run once. If a
template doesn't already exist, the psf stage will be run, then template
stage, then the psf stage on the template image. If --show is selected,
make sure that the tempfwhm is the same for both psf stages.