parse_flt_files¶
- grizli.utils.parse_flt_files(files=[], info=None, uniquename=False, use_visit=False, get_footprint=False, translate={'AEGIS-': 'aegis-', 'COSMOS-': 'cosmos-', 'GNGRISM': 'goodsn-', 'GOODS-SOUTH-': 'goodss-', 'UDS-': 'uds-'}, visit_split_shift=1.5, max_dt=1000000000.0, path='../RAW')[source]¶
- Read header information from a list of exposures and parse out groups
based on filter/target/orientation.
- Parameters
- fileslist, optional
List of exposure filenames. If not specified, will use
*flt.fits
.- infoNone or
Table
, optional Output from
get_flt_info
.- uniquenamebool, optional
If True, then split everything by program ID and visit name. If False, then just group by targname/filter/pa_v3.
- use_visitbool, optional
For parallel observations with
targname='ANY'
, use the filename up to the visit ID as the target name. For example:>>> flc = 'jbhj64d8q_flc.fits' >>> visit_targname = flc[:6] >>> print(visit_targname) jbhj64
If False, generate a targname for parallel observations based on the pointing coordinates using
radec_to_targname
. Use this keyword for dithered parallels like 3D-HST / GLASS but set to False for undithered parallels like WISP. Should also generally be used withuniquename=False
otherwise generates names that are a bit redundant:uniquename
Output Targname
True
jbhj45-bhj-45-180.0-F814W
False
jbhj45-180.0-F814W
- get_footprintbool, optional
If True, get the visit footprint from FLT WCS.
- translatedict, optional
Translation dictionary to modify TARGNAME keywords to some other value. Used like:
>>> targname = 'GOODS-SOUTH-10' >>> translate = {'GOODS-SOUTH-': 'goodss-'} >>> for k in translate: >>> targname = targname.replace(k, translate[k]) >>> print(targname) goodss-10
- visit_split_shiftfloat, optional
Separation in
arcmin
beyond which exposures in a group are split into separate visits.- max_dtfloat, optional
Maximum time separation between exposures in a visit, in seconds.
- pathstr, optional
PATH to search for
flt
files ifinfo
not provided
- Returns
- output_listdict
Dictionary split by target/filter/pa_v3. Keys are derived visit product names and values are lists of exposure filenames corresponding to that set. Keys are generated with the formats like:
>>> targname = 'macs1149+2223' >>> pa_v3 = 32.0 >>> filter = 'f140w' >>> flt_filename = 'ica521naq_flt.fits' >>> propstr = flt_filename[1:4] >>> visit = flt_filename[4:6] >>> # uniquename = False >>> print('{0}-{1:05.1f}-{2}'.format(targname, pa_v3, filter)) macs1149.6+2223-032.0-f140w >>> # uniquename = True >>> print('{0}-{1:3s}-{2:2s}-{3:05.1f}-{4:s}'.format(targname, propstr, visit, pa_v3, filter)) macs1149.6+2223-ca5-21-032.0-f140w
- filter_listdict
Nested dictionary split by filter and then PA_V3. This shouldn’t be used if exposures from completely disjoint pointings are stored in the same working directory.