Tcat¶
- class gdt.missions.gifts.tcat.Tcat[source]¶
Bases:
TcatTCAT (Trigger CATalog) file class.
Attributes Summary
Fermi's orbital longitude and latitude
The filename
GIFT's orbital longitude and latitude
The list of Header Data Units
The headers
The localizing instrument
Location in equatorial coordinates
Name of the trigger
The number of HDUs
The time range
The trigger time
Methods Summary
close()Close the file
column(hdu_num, col_name)Return a column from an HDU as an array.
columns_as_array(hdu_num, col_names[, dtype])Return a list of columns from an HDU as an array.
get_column_names(hdu_num)Get the column names in a HDU.
open(file_path, **kwargs)Open a TCAT FITS file and return the Tcat object
write(directory[, filename])Write the file to disk.
Attributes Documentation
- fermi_location¶
Fermi’s orbital longitude and latitude
- Type:
(astropy.coordinates.Longitude, astropy.coordinates.Latitude)
- filename¶
The filename
- Type:
(str)
- gifts_location¶
GIFT’s orbital longitude and latitude
- Type:
(astropy.coordinates.Longitude, astropy.coordinates.Latitude)
- hdulist¶
The list of Header Data Units
- Type:
(astropy.io.fits.hdu.HDUList)
- headers¶
The headers
- Type:
- localizing_instrument¶
The localizing instrument
- Type:
(str)
- location¶
Location in equatorial coordinates
- Type:
(astropy.coordinates.SkyCoord)
- name¶
Name of the trigger
- Type:
(str)
- num_hdus¶
The number of HDUs
- Type:
(int)
- trigtime¶
The trigger time
- Type:
(float)
Methods Documentation
- close()¶
Close the file
- column(hdu_num: int, col_name: str) array¶
Return a column from an HDU as an array.
- Parameters:
hdu_num (int) – The HDU number
col_name (str) – The name of the column
- Returns:
(np.array)
- columns_as_array(hdu_num: int, col_names: List[str], dtype: dtype = None) array¶
Return a list of columns from an HDU as an array.
- Parameters:
hdu_num (int) – The HDU number
col_names (list of str) – The names of the columns
dtype (np.dtype, optional) – The custom dtype of the output array
- Returns:
(np.array)
- get_column_names(hdu_num: int)¶
Get the column names in a HDU. Returns empty if there is no data extension in the HDU.
- Parameters:
hdu_num (int) – The HDU number
- Returns:
(tuple)
- classmethod open(file_path, **kwargs)[source]¶
Open a TCAT FITS file and return the Tcat object
- Parameters:
file_path (str) – The file path of the FITS file
- Returns:
(
Tcat)
- write(directory: str | Path, filename: str = None, **kwargs)¶
Write the file to disk.
- Parameters:
directory (str) – The directory to write the file.
filename (str, optional) – The filename. If omitted, attempts to use the
filenameif set.