GscArf¶
- class gdt.missions.maxi.gsc.response.GscArf[source]¶
Bases:
FitsFileContextManagerA MAXI GSC Ancillary Response File (ARF)
Attributes Summary
The detector name
The filename
The list of Header Data Units
The headers
The number of HDUs
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_arf(hv)Retrieve the ARF
get_column_names(hdu_num)Get the column names in a HDU.
open(file_path, **kwargs)Read an ARF from disk.
write(directory[, filename])Write the file to disk.
Attributes Documentation
- detector¶
The detector name
- Type:
(str)
- filename¶
The filename
- Type:
(str)
- hdulist¶
The list of Header Data Units
- Type:
(astropy.io.fits.hdu.HDUList)
- headers¶
The headers
- Type:
- num_hdus¶
The number of HDUs
- Type:
(int)
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_arf(hv)[source]¶
Retrieve the ARF
- Parameters:
hv (int) – The HV bit corresponding to the ARF to retrieve. Valid values are 803 and 854.
- Returns:
(
Bins)
- 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]¶
Read an ARF from disk.
- Parameters:
file_path (str) – The file path
- Returns:
(
GscArf)
- write(directory: Union[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.