SwiftPhotom.uvot.check_aspect_correction(_infile)[source]

Simply check if the ‘ASPCORR’ label in the header of each extension is equal to ‘DIRECT’. If it isn’t, it prints out a WARNING, notifying that astrometry could be off.

SwiftPhotom.uvot.combine(_list, _outfile)[source]

Combines images with fappend

SwiftPhotom.uvot.create_product(_flist, _filter, template=0, no_combine=0)[source]

If a file has multiple extensions, these are first combined into a single image. If the FRAMTIMEs are different, than no merging is not possible. The merging is carried out by uvotimsum, and the combined images are saved in the ‘mid-products’ folder, created for each filer inside the ‘reduction’ directory.

If the user prefer to extract every extension separately, they can use the –no_combine flag.

All the files are then appended to a single ‘product file’, which end up containing all extensions of all images.

During this step, the aspect correction for each file is also checked.

SwiftPhotom.uvot.extract_photometry(_phot_file, _ab, _det_limit, _ap_size, _templ_file=None)[source]
SwiftPhotom.uvot.get_aperture_size(_reg)[source]

Retrieve the aperture size from the region file.

SwiftPhotom.uvot.interpret_infile(_infile)[source]

Interpret what type of input the user is providing

_infile will be a list of strings with either one or two elements

The output will be file_list, a list containing 2 lists: file_list[0] will be the object file list file_list[1] will be the template file list

Creating a single list, I can fill them both with a for loop, even if only the object list is provided.

SwiftPhotom.uvot.load_obsid(_obsid_string)[source]

Looking for sky frames with the given ObsID. The search is done in the working directory and in all subdirectories. It will look for file with the conventional naming

sw[obsID][obsIdx]u[filter]_sk.img.gz

or without the .gz

SwiftPhotom.uvot.output_mags(_mag, _ap_size)[source]
SwiftPhotom.uvot.run_uvotmaghist(_prod_file, _sn_reg, _bg_reg, _filter)[source]
SwiftPhotom.uvot.sort_file_list(_flist)[source]

Organize the file list into a dictionary sorted by filter

SwiftPhotom.uvot.sort_filters(_filt_list)[source]

Function to recognize filter-related keywords