mission
mission.base module
- class daxa.mission.base.BaseMission[source]
Bases:
objectThe superclass for all missions defined in this module. Mission classes will be for storing and interacting with information about the available data for particular missions; including filtering the observations to be prepared and reduced in various ways. The mission classes will also be responsible for providing a consistent user experience of downloading data and generating processed archives.
- abstract property name
Abstract property getter for the name of this mission. Must be overwritten in any subclass. This is to ensure that any subclasses that people might add will definitely set a proper name, which is not guaranteed by having it done in the init.
- Returns:
The mission name
- Return type:
str
- property pretty_name
The property getter for the ‘pretty name’ of this mission. This version of the name will NOT be used to identify a mission internally in DAXA, or to name any directories, but will be used when the user sees a name (e.g. when a progress bar is running for a mission download).
- Returns:
The ‘pretty’ name.
- Return type:
str
- abstract property coord_frame
Abstract property getter for the coordinate frame of the RA-Decs of the observations of this mission. Must be overwritten in any subclass. This is to ensure that any subclasses that people might add will definitely set a coordinate frame, which is not guaranteed by having it done in the init.
- Returns:
The coordinate frame of the RA-Dec
- Return type:
BaseRADecFrame
- abstract property id_regex
Abstract property getter for the regular expression (regex) pattern for observation IDs of this mission. Must be overwritten in any subclass. This is to ensure that any subclasses that people might add will definitely set an ID pattern, which is not guaranteed by having it done in the init.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- abstract property fov
Abstract property getter for the approximate field-of-view of this mission’s instrument(s). In cases where different instruments have different field-of-views this may be a dictionary (see ROSATPointed for an example). Must be overwritten in any subclass. This is to ensure that any subclasses that people might add will definitely set a FoV, which is not guaranteed by having it done in the init.
The convention will be that the value supplied is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it should be the half-side-length of the longest side.
A dictionary should ONLY be defined if the instruments have different field of views, and have their own observations in the all_obs_info table (e.g. ROSAT’s instruments are mutually exclusive and cannot have multiple per observation).
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_mission_instruments
Property getter for the names of all possible instruments associated with this mission.
- Returns:
A list of instrument names.
- Return type:
List[str]
- property chosen_instruments
Property getter for the names of the currently selected instruments associated with this mission which will be processed into an archive by DAXA functions.
- Returns:
A list of instrument names
- Return type:
List[str]
- property top_level_path
The property getter for the absolute path to the top-level directory where raw data storage directories are created.
- Returns:
Absolute top-level storage path.
- Return type:
str
- property raw_data_path
Property getter for the directory in which raw data for the current mission is stored.
- Returns:
Storage path for raw data for this mission.
- Return type:
str
- property filter_array
A property getter for the ‘filter’ array, which is set by the filtering methods built-in to this class (or can be set externally using the filter_array property setter) and controls which observations will be downloaded and processed.
- Returns:
An array of boolean values; True means that an observation is used, False means that it is not.
- Return type:
np.ndarray
- property filtering_operations
A property getter for the filtering operations that have been applied to this mission, in the order they were applied. This is mainly stored so that missions that have been reinstated from a save file can be updated by running the exact same filtering operations again.
- Returns:
A list of dictionaries which have two keys, ‘name’, and ‘arguments’; the ‘name’ key corresponds to the name of the filtering method, and the ‘arguments’ key corresponds to a dictionary of arguments that were passed to the method. 0th element was applied first, Nth element was applied last.
- Return type:
List[dict]
- abstract property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class. This is an abstract method purely because its property setter is an abstract method, one cannot be without the other.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- property filtered_obs_info
A property getter that applies the current filter array to the dataframe of observation information, and returns filtered dataframe containing all columns available for this mission.
- Returns:
A filtered dataframe of observation information.
- Return type:
pd.DataFrame
- property science_usable
Property getter for the ‘science_usable’ column of the all observation information dataframe. This ‘science_usable’ column describes whether a particular observation is usable by this module; i.e. that the data are suitable for scientific use (so far as can be identified by querying the storage service). This science_usable property is the basis for the filter array, resetting the filter array will return it to the values of this column.
Data that are marked as scientifically useful but are still in a proprietary period will return True here, as the user may have been the one to take those data. If suitable credentials cannot be produced at download time however, those proprietary data will be marked as unusable.
- Returns:
A boolean array detailing whether an observation is scientifically useful or not.
- Return type:
np.ndarray
- property ra_decs
Property getter for the RA-Dec coordinates of ALL the observations associated with this mission - for the coordinates of filtered observations (i.e. the observations that will actually be used for downloading/processing), see the filtered_ra_decs property.
- Returns:
The full set of RA-Dec coordinates of all observations associated with this mission.
- Return type:
SkyCoord
- property filtered_ra_decs
Property getter for the RA-Dec coordinates of the filtered set of observations associated with this mission - for coordinates of ALL observations see the ra_decs property.
- Returns:
The RA-Dec coordinates of filtered observations associated with this mission.
- Return type:
SkyCoord
- property obs_ids
Property getter for the ObsIDs of ALL the observations associated with this mission - for the ObsIDs of filtered observations (i.e. the observations that will actually be used for downloading/processing), see the filtered_obs_ids property.
- Returns:
The full set of ObsIDs of all observations associated with this mission.
- Return type:
np.ndarray
- property filtered_obs_ids
Property getter for the ObsIDs of the filtered set of observations associated with this mission - for ObsIDs of ALL observations see the obs_ids property.
- Returns:
The ObsIDs of filtered observations associated with this mission.
- Return type:
np.ndarray
- property download_completed
Property getter that describes whether the specified data for this mission have been downloaded.
- Returns:
Boolean flag describing if data have been downloaded.
- Return type:
bool
- property downloaded_type
Property getter that describes what type of data was downloaded for this mission (or raises an exception if no download has been performed yet). The value will be either ‘raw’, ‘preprocessed’, or ‘raw+preprocessed’.
- Returns:
A string identifier for the type of data downloaded; the value will be either ‘raw’, ‘preprocessed’, or ‘raw+preprocessed’
- Return type:
str
- property locked
Property getter for the locked attribute of this mission instance - if a mission is locked then no further changes can be made to the observations selected.
- Returns:
The locked boolean.
- Return type:
bool
- property processed
A property getter that returns whether the observations associated with this mission have been fully processed or not.
- Returns:
The processed boolean flag.
- Return type:
bool
- property preprocessed_energy_bands
Property getter for a non-scalar astropy Quantity containing the energy bands of the pre-processed products supplied by this mission. The return will be in the form of a dictionary with instrument names as keys and an array of pairs of energies, in keV, as values.
- Returns:
A dictionary with mission instrument names as keys, and non-scalar astropy Quantities as values, with the first column being lower energy bounds and the second column being upper energy bounds.
- Return type:
Quantity
- property one_inst_per_obs
This property returns a boolean flag that describes whether this mission has one instrument per ObsID or not. Most DAXA missions have multiple instruments per observation (or can do, if the user has selected them).
- Returns:
Flag showing whether there are multiple instruments per observation.
- Return type:
bool
- property updated_meta_info
This property returns a dictionary containing information about what changed during the last update of this mission, populated only after running the update() method. This is useful for Archives containing this mission as they can use it to update their version.
- Returns:
The dictionary containing information about the update to this mission.
- Return type:
dict
- reset_filter()[source]
Very simple method which simply resets the filter array, meaning that all observations THAT HAVE BEEN MARKED AS USABLE will now be downloaded and processed, and any filters applied to the current mission have been undone.
- check_obsid_pattern(obs_id_to_check)[source]
A simple method that will check an input ObsID against the ObsID regular expression pattern defined for the current mission class. If the input ObsID is compliant with the regular expression then True will be returned, if not then False will be returned.
- Parameters:
obs_id_to_check (str) – The ObsID that we wish to check against the ID pattern.
- Returns:
A boolean flag indicating whether the input ObsID is compliant with the ID regular expression. True means that it is, False means it is not.
- Return type:
bool
- check_inst_names(insts, error_on_bad_inst=True, show_warn=True)[source]
A method to perform some checks on the validity of chosen instrument names for a given mission.
- Parameters:
insts (List[str]/str) – Instrument names that are to be checked for the current mission, either a single name or a list of names.
error_on_bad_inst (bool) – Controls whether an exception is raised if the instrument(s) aren’t actually associated with this mission - intended for DAXA checking operations (see ‘get_process_logs’ of Archive for an example). Default is True.
show_warn (bool) – Should warnings produced by this method be shown? Default is True
- Returns:
The list of instruments (possibly altered to match formats expected by this module).
- Return type:
List
- filter_on_obs_ids(allowed_obs_ids, invert=False)[source]
This filtering method will select only observations with IDs specified by the allowed_obs_ids argument (or select only observations that AREN’T specified by the allowed_obs_ids argument, if invert=True).
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
allowed_obs_ids (str/List[str]) – The ObsID (or list of ObsIDs) that you wish to be let through the filter (or exclude from it if invert=True).
invert (bool) – This argument can invert the behaviour of this filtering method, selecting every ObsID that isn’t specified in allowed_obs_ids. Default is False.
- filter_on_rect_region(lower_left, upper_right)[source]
A method that filters observations based on whether their CENTRAL COORDINATE falls within a rectangular region defined using coordinates of the bottom left and top right corners. Observations are kept if they fall within the region.
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
lower_left (SkyCoord/np.ndarray/list) – The RA-Dec coordinates of the lower left corner of the rectangular region. This can be passed as a SkyCoord, or a list/array with two entries - this will then be used to create a SkyCoord which assumes the default frame of the current mission and that the inputs are in degrees. NOTE that we wish the coordinates to be passed with RA increasing from left to right, but we will attempt to interpret coordinates passed with RA increasing from right to left, and will show a warning.
upper_right (SkyCoord/np.ndarray/list) – The RA-Dec coordinates of the upper right corner of the rectangular region. This can be passed as a SkyCoord, or a list/array with two entries - this will then be used to create a SkyCoord which assumes the default frame of the current mission and that the inputs are in degrees. NOTE that we wish the coordinates to be passed with RA increasing from left to right, but we will attempt to interpret coordinates passed with RA increasing from right to left, and will show a warning.
- filter_on_positions(positions, search_distance=None, return_pos_obs_info=False)[source]
This method allows you to filter the observations available for a mission based on a set of coordinates for which you wish to locate observations. The method searches for observations by the current mission that have central coordinates within the distance set by the search_distance argument.
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
positions (list/np.ndarray/SkyCoord) – The positions for which you wish to search for observations. They can be passed either as a list or nested list (i.e. [r, d] OR [[r1, d1], [r2, d2]]), a numpy array, or an already defined SkyCoord. If a list or array is passed then the coordinates are assumed to be in degrees, and the default mission frame will be used.
search_distance (Quantity/float/int/list/np.ndarray/dict) – The distance within which to search for observations by this mission. Distance may be specified either as an Astropy Quantity that can be converted to degrees (a float/integer will be assumed to be in units of degrees), as a dictionary of quantities/floats/ints where the keys are names of different instruments (possibly with different field of views), or as a non-scalar Quantity, list, or numpy array with one entry per set of coordinates (for when you wish to use different search distances for each object). The default is None, in which case a value of 1.2 times the approximate field of view defined for each instrument will be used; where different instruments have different FoVs, observation searches will be undertaken on an instrument-by-instrument basis using the different field of views.
return_pos_obs_info (bool) – Allows this method to return information (in the form of a Pandas dataframe) which identifies the positions which have been associated with observations, and the observations they have been associated with. Default is False.
- Returns:
If return_pos_obs_info is True, then a dataframe containing information on which ObsIDs are relevant to which positions will be returned. If return_pos_obs_info is False, then None will be returned.
- Return type:
Union[None,pd.DataFrame]
- filter_on_name(object_name, search_distance=None, parse_name=False)[source]
This method wraps the ‘filter_on_positions’ method, and allows you to filter the mission’s observations so that it contains data on a single (or a list of) specific objects. The names are passed by the user, and then parsed into coordinates using the Sesame resolver. Those coordinates and the search distance are then used to find observations that might be relevant.
- Parameters:
object_name (str/List[str]) – The name(s) of objects you would like to search for.
search_distance (Quantity/float/int/list/np.ndarray/dict) – The distance within which to search for observations by this mission. Distance may be specified either as an Astropy Quantity that can be converted to degrees (a float/integer will be assumed to be in units of degrees), as a dictionary of quantities/floats/ints where the keys are names of different instruments (possibly with different field of views), or as a non-scalar Quantity, list, or numpy array with one entry per set of coordinates (for when you wish to use different search distances for each object). The default is None, in which case a value of 1.2 times the approximate field of view defined for each instrument will be used; where different instruments have different FoVs, observation searches will be undertaken on an instrument-by-instrument basis using the different field of views.
parse_name (bool) – Whether to attempt extracting the coordinates from the name by parsing with a regex. For objects catalog names that have J-coordinates embedded in their names, e.g., ‘CRTS SSS100805 J194428-420209’, this may be much faster than a Sesame query for the same object name.
- filter_on_time(start_datetime, end_datetime, over_run=True)[source]
This method allows you to filter observations for this mission based on when they were taken. A start and end time are passed by the user, and observations that fall within that window are allowed through the filter. The exact behaviour of this filtering method is controlled by the over_run argument, if set to True then observations with a start or end within the search window will be selected, but if False then only observations with a start AND end within the window are selected.
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
start_datetime (datetime) – The beginning of the time window in which to search for observations.
end_datetime (datetime) – The end of the time window in which to search for observations.
over_run (bool) – This controls whether selected observations have to be entirely within the passed time window or whether either a start or end time can be within the search window. If set to True then observations with a start or end within the search window will be selected, but if False then only observations with a start AND end within the window are selected. Default is True.
- filter_on_target_type(target_type)[source]
This method allows the filtering of observations based on what type of object their target source was. It is only supported for missions that have that data available, and will raise an exception for those missions that don’t support this filtering.
WARNING: You should not trust these target types without question, they are the result of crude mappings, and some may be incorrect. They also don’t take into account sources that might serendipitously appear in a particular observation.
- Parameters:
target_type (str/List[str]) – The types of target source you would like to find observations of. For allowed types, please use the ‘show_allowed_target_types’ method. Can either be a single type, or a list of types.
- filter_on_positions_at_time(positions, start_datetimes, end_datetimes, search_distance=None, return_obs_info=False, over_run=True)[source]
This method allows you to filter the observations available for a mission based on a set of coordinates for which you wish to locate observations that were taken within a certain time frame. The method spatially searches for observations that have central coordinates within the distance set by the search_distance argument, and temporally by start and end times passed by the user; and observations that fall within that window are allowed through the filter.
The exact behaviour of the temporal filtering method is controlled by the over_run argument, if set to True then observations with a start or end within the search window will be selected, but if False then only observations with a start AND end within the window are selected.
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
positions (list/np.ndarray/SkyCoord) – The positions for which you wish to search for observations. They can be passed either as a list or nested list (i.e. [r, d] OR [[r1, d1], [r2, d2]]), a numpy array, or an already defined SkyCoord. If a list or array is passed then the coordinates are assumed to be in degrees, and the default mission frame will be used.
start_datetimes (np.array(datetime)/datetime) – The beginnings of time windows in which to search for observations. There should be one entry per position passed.
end_datetimes (np.array(datetime)/datetime) – The endings of time windows in which to search for observations. There should be one entry per position passed.
search_distance (Quantity/float/int/list/np.ndarray/dict) – The distance within which to search for observations by this mission. Distance may be specified either as an Astropy Quantity that can be converted to degrees (a float/integer will be assumed to be in units of degrees), as a dictionary of quantities/floats/ints where the keys are names of different instruments (possibly with different field of views), or as a non-scalar Quantity, list, or numpy array with one entry per set of coordinates (for when you wish to use different search distances for each object). The default is None, in which case a value of 1.2 times the approximate field of view defined for each instrument will be used; where different instruments have different FoVs, observation searches will be undertaken on an instrument-by-instrument basis using the different field of views.
return_obs_info (bool) – Allows this method to return information (in the form of a Pandas dataframe) which identifies the positions which have been associated with observations, in the specified time frame, and the observations they have been associated with. Default is False.
over_run (bool) – This controls whether selected observations have to be entirely within the passed time window or whether either a start or end time can be within the search window. If set to True then observations with a start or end within the search window will be selected, but if False then only observations with a start AND end within the window are selected. Default is True.
- abstract download(download_products=False)[source]
An abstract method to actually acquire and download the mission data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). This must be overwritten by every subclass as each mission might need a different method of downloading the data, the same reason fetch_obs_info must be overwritten in each subclass.
- abstract assess_process_obs(obs_info)[source]
A slightly unusual abstract method which will allow each mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument-subexposure (for missions like XMM) should be processed further for scientific use.
Implemented as an abstract method because the information and decision-making process will likely be different for every mission.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- abstract ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
- static show_allowed_target_types(table_format='fancy_grid')[source]
This simple method just displays the DAXA source type taxonomy (the target source types you can filter by) in a nice table, with descriptions of what each source type means. Filtering on target source type is not guaranteed to work with every mission, as target type information is not necessarily available, but this filtering is used through the filter_on_target_type method.
- Parameters:
table_format (str) – The style format for the table to be displayed (should be one of the ‘tabulate’ module formats). The default is ‘fancy_grid’.
- get_evt_list_path(obs_id, inst=None)[source]
A get method that provides the path to a downloaded pre-generated event list for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the event list.
inst (str) – The instrument of the event list (if applicable).
- Returns:
The requested event list path.
- Return type:
str
- get_image_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated image for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the image.
lo_en (Quantity) – The lower energy bound of the image.
hi_en (Quantity) – The upper energy bound of the image.
inst (str) – The instrument of the image (if applicable).
- Returns:
The requested image file path.
- Return type:
str
- get_expmap_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated exposure map for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the exposure map.
lo_en (Quantity) – The lower energy bound of the exposure map.
hi_en (Quantity) – The upper energy bound of the exposure map.
inst (str) – The instrument of the exposure map (if applicable).
- Returns:
The requested exposure map file path.
- Return type:
str
- get_background_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated background map for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the background map.
lo_en (Quantity) – The lower energy bound of the background map.
hi_en (Quantity) – The upper energy bound of the background map.
inst (str) – The instrument of the background map (if applicable).
- Returns:
The requested background map file path.
- Return type:
str
- delete_raw_data(force_del=False, all_raw_data=False)[source]
This method will delete raw data downloaded for this mission; by default only directories corresponding to ObsIDs currently accepted through the filter will be deleted, but if all_raw_data is set to True then the WHOLE raw data directory corresponding to this mission will be removed.
Confirmation from the user will be sought that they wish to delete the data, unless force_del is set to True - in which case the removal will be performed straight away.
- Parameters:
force_del (bool) – This argument can be used to ensure that the delete option can be performed entirely programmatically, without requiring a user input. Default is False, but if set to True then the delete operation will be performed immediately.
all_raw_data (bool) – This controls whether only the data selected by the current instance of the mission are deleted (when False, the default behaviour) or if the whole directory associated with the mission is removed.
- save(save_root_path, state_file_name=None)[source]
A method to save a file representation of the current state of a DAXA mission object. This may be used by the user, and can be safely sent to another user or system to recreate a mission. It is also used by the archive saving mechanic, so that mission objects can be re-set up - it is worth noting that the archive save files ARE NOT how to make a portable archive.
- Parameters:
save_root_path (str) – The DIRECTORY where you wish a save file to be stored.
state_file_name (str) – Optionally, the name of the file to be stored in the root save directory. If this is not supplied (the default is None) then the output file will be called {mission name}_state.json. Any filename passed to this argument must end in ‘.json’.
- update(download_new=True)[source]
This method is meant to update the selected observations of a mission which has been loaded in from the save state. The filtering operations from the saved state will be re-applied in the same order (and with the same configurations) as they were originally. This is designed to allow mission data selections to be easily updated to reflect newly available observations; particularly useful for large samples of objects.
NOTE - THIS METHOD WILL NOT AUTOMATICALLY CALL THE save() METHOD.
- Parameters:
download_new (bool) – Controls whether any newly selected data from the update should be downloaded automatically by this method. Default is True, the download type (i.e. with products or without) will be defined by what was originally downloaded by this mission. If no data was downloaded in the original form of this mission then the download() method will have to be run after this method.
mission.tools module
- daxa.mission.tools.multi_mission_filter_on_positions(positions, search_distance=None, missions=None, insts=None)[source]
Convenience function to search around a position for observations across multiple missions. By default this function will search all available missions supported by DAXA. This will set up Mission objects and filter their observations based on the input positions and search_distance argument. If a mission does not have any observations matched after the filtering, they will not be included in the list output.
- Parameters:
positions (list/np.ndarray/SkyCoord) – The positions for which you wish to search for observations. They can be passed either as a list or nested list (i.e. [r, d] OR [[r1, d1], [r2, d2]]), a numpy array, or an already defined SkyCoord. If a list or array is passed then the coordinates are assumed to be in degrees, and the default mission frame will be used.
search_distance (Quantity/dict) – The distance to search for observations within, the default is None in which case standard search distances for different missions are used. The user may pass a single Quantity to use for all missions or a dictionary with keys corresponding to ALL or SOME of the missions specified by the ‘mission’ argument. In the case where only SOME of the missions are specified in a distance dictionary, the default DAXA values will be used for any that are missing. When specifying a search distance for a specific mission, this may be either an Astropy Quantity that can be converted to degrees (a float/integer will be assumed to be in units of degrees), as a dictionary of quantities/floats/ints where the keys are names of different instruments (possibly with different field of views), or as a non-scalar Quantity, list, or numpy array with one entry per set of coordinates (for when you wish to use different search distances for each object). The default is None, in which case a value of 1.2 times the approximate field of view defined for each instrument will be used; where different instruments have different FoVs, observation searches will be undertaken on an instrument-by-instrument basis using the different field of views.
missions (list[str]) – list of mission names that will have the filter performed on. If set to None, this function will perform the search on all missions available within DAXA.
insts (dict) – Dictionary with mission names as keys, and values that are either Lists of strings or a string giving the instrument(s) to be used for the search. The values should be in the same format that you would parse to a Mission object when chosing instruments when the object is first instantiated.
- Returns:
A list of missions that have observations associated with them. The list contains Mission objects that have had the filtering applied and have found matching observations.
- Return type:
List[daxa.mission.BaseMission]
mission.xmm module
- class daxa.mission.xmm.XMMPointed(insts=None, save_file_path=None, use_heasarc=False)[source]
Bases:
BaseMissionThe mission class for pointed XMM observations (i.e. slewing observations are NOT included in the data accessed and collected by instances of this class). The available observation information is fetched from the XMM Science Archive using AstroQuery, and data are downloaded with the same module.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. The EPIC PN, MOS1, and MOS2 instruments are selected by default. You may also select RGS1 (R1) and RGS2 (R2), though as they less widely used they are not selected by default. It is also possible to select the Optical Monitor (OM), though it is an optical/UV telescope, and as such it is not selected by default.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
use_heasarc (bool) – A boolean argument that controls how XMM data are acquired. The default value (False) means that the AstroQuery module will be used to fetch information/data from XSA, and setting it to True will tell this mission to acquire information/data from HEASARC instead. We find that some HPC configurations don’t allow AstroQuery to work properly, in which case this argument will be automatically set to True, and data will be acquired from HEASARC instead.
- property name
Property getter for the name of this mission.
- Returns:
The mission name
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, credentials=None, download_products=False)[source]
A method to acquire and download the pointed XMM data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine. The number of cores will be CAPPED AT 10 FOR XMM - we have experienced reliably dropped connections when more than 10 download processes are created.
credentials (dict/str) – The path to an ini file containing credentials, a dictionary containing ‘user’ and ‘password’ entries, or a dictionary of ObsID top level keys, with ‘user’ and ‘password’ entries for providing different credentials for different observations.
download_products (bool) – CURRENTLY NON-FUNCTIONAL.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the XMMPointed mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument-subexposure should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- Returns:
A two-level dictionary with instruments as the top level keys, and sub-exposure IDs as the low level keys. The values associated with the sub-exposure keys are boolean, True for usable, False for not.
- Return type:
dict
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.erosita module
- class daxa.mission.erosita.eROSITACalPV(insts=None, fields=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for the eROSITA early data release observations made during the Calibration and Performance Verification program.
- Parameters:
fields (List[str]/str) – The eROSITA calibration field name(s) or type to download/process data from.
insts (List[str]/str) – The instruments that the user is choosing to download/process data from.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission.
- Returns:
The mission name
- Return type:
str
- property chosen_instruments
Property getter for the names of the currently selected instruments associated with this mission which will be processed into an archive by DAXA functions. Overwritten here because there are custom behaviours for eROSITA.
- Returns:
A list of instrument names
- Return type:
List[str]
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
NOTE - THIS FIELD OF VIEW IS SORT OF NONSENSE BECAUSE OF HOW SOME OF THE eROSITACalPV DATA WERE TAKEN IN POINTING AND SOME IN SLEWING MODE.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- property all_mission_fields
Property getter for the names of all possible fields associated with this mission.
- Returns:
A list of field names.
- Return type:
List[str]
- property all_mission_field_types
Property getter for the names of all possible field types associated with this mission.
- Returns:
A list of field types.
- Return type:
List[str]
- property chosen_fields
Property getter for the names of the currently selected fields associated with this mission which will be processed into an archive by DAXA functions.
- Returns:
A list of field names
- Return type:
List[str]
- filter_on_fields(fields)[source]
This filtering method will select only observations included in the fields specified.
- Parameters:
allowed_fields (str/List[str]) – The fields or field types (or list of fields or field types) that you wish to be let through the filter.
- filter_on_obs_ids(allowed_obs_ids)[source]
This filtering method will select only observations with IDs specified by the allowed_obs_ids argument.
Please be aware that filtering methods are cumulative, so running another method will not remove the filtering that has already been applied, you can use the reset_filter method for that.
- Parameters:
allowed_obs_ids (str/List[str]) – The ObsID (or list of ObsIDs) that you wish to be let through the filter.
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the eROSITA Calibration and Performance Validation data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Fields (or field types) specified by the chosen_fields property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_fields property. Downloaded data is then filtered according to Instruments specified by the chosen_instruments property (set in the same manner as chosen_fields).
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – UNLIKE MOST MISSIONS, this does not actually change what is downloaded, but rather changes the DAXA classification of the downloaded event lists from raw to raw+preprocessed. This means they would be included in the processed data storage structure of an archive.
- get_evt_list_path(obs_id, inst=None)[source]
A get method that provides the path to a downloaded pre-generated event list for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the event list.
inst (str) – The instrument of the event list (if applicable).
- Returns:
The requested event list path.
- Return type:
str
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the eROSITACalPV mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
- class daxa.mission.erosita.eRASS1DE(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for the first data release of the German half of the eROSITA All-Sky Survey
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission.
- Returns:
The mission name
- Return type:
str
- property chosen_instruments
Property getter for the names of the currently selected instruments associated with this mission which will be processed into an archive by DAXA functions. Overwritten here because there are custom behaviours for eROSITA.
- Returns:
A list of instrument names
- Return type:
List[str]
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True, pipeline_version=None)[source]
A method to acquire and download the German eROSITA All-Sky Survey DR1 data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Downloaded data is then filtered according to Instruments specified by the chosen_instruments property (set in the same manner as chosen_fields).
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the data downloaded include the images and exposure maps generated by the eROSITA team and included in the first data release. The default is True.
pipeline_version (int) – The processing pipeline version used to generate the data that is to be downloaded. The default is None, in which case the latest available will be used.
- get_evt_list_path(obs_id, inst=None)[source]
A get method that provides the path to a downloaded pre-generated event list for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the event list.
inst (str) – The instrument of the event list (if applicable).
- Returns:
The requested event list path.
- Return type:
str
- get_image_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated image for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the image.
lo_en (Quantity) – The lower energy bound of the image.
hi_en (Quantity) – The upper energy bound of the image.
inst (str) – The instrument of the image (if applicable).
- Returns:
The requested image file path.
- Return type:
str
- get_expmap_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated exposure map for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the exposure map.
lo_en (Quantity) – The lower energy bound of the exposure map.
hi_en (Quantity) – The upper energy bound of the exposure map.
inst (str) – The instrument of the exposure map (if applicable).
- Returns:
The requested exposure map file path.
- Return type:
str
- get_background_path(obs_id, lo_en=None, hi_en=None, inst=None)[source]
A get method that provides the path to a downloaded pre-generated background map for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the background map.
lo_en (Quantity) – The lower energy bound of the background map.
hi_en (Quantity) – The upper energy bound of the background map.
inst (str) – The instrument of the background map (if applicable).
- Returns:
The requested background map file path.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the eRASS1DE mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.chandra module
- class daxa.mission.chandra.Chandra(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for Chandra observations. The available observation information is fetched from the HEASArc CHANMASTER table, and data are downloaded from the HEASArc https access to their FTP server. Proprietary data are not currently supported by this class.
This will be the only Chandra mission class, as they do not appear to take data during slewing (like XMM and NuSTAR).
Selecting particular instruments will effectively be putting a filter on the observations, as due to the design of Chandra ACIS and HRC instruments cannot observe simultaneously.
Functionally, this class is very similar to NuSTARPointed.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. Allowed instrument names are ‘ACIS’ and ‘HRC’ - grating names can also be passed as instrument names here (‘HETG’ and ‘LETG’).
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property chosen_instruments
Property getter for the names of the currently selected instruments associated with this mission which will be processed into an archive by DAXA functions. Overwritten here because there are custom behaviours for Chandra, as it has one instrument per ObsID.
- Returns:
A list of instrument names
- Return type:
List[str]
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission. Chandra is the only one so far to actually use ICRS! (or at least it does for its source lists and image WCS headers).
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, credentials=None, download_products=True)[source]
A method to acquire and download the pointed Chandra data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
If you’re using DAXA only for data acquisition, and wish to use CIAO scripts for reprocessing (e.g. ‘chandra_repro’), then set ‘download_products=True’.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
credentials (dict/str) – The path to an ini file containing credentials, a dictionary containing ‘user’ and ‘password’ entries, or a dictionary of ObsID top level keys, with ‘user’ and ‘password’ entries for providing different credentials for different observations.
download_products (bool) – Whether the ‘standard’ Chandra data structure should be downloaded (i.e. with ‘primary’ and ‘secondary’ directories, including pre-generated images. The default is True, if set to False only event lists will be downloaded.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the Chandra mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- Returns:
Dictionary with instrument name as top level key, sub-exposure identifier as lower level key, and True/False as the value.
- Return type:
dict
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.nustar module
- class daxa.mission.nustar.NuSTARPointed(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for pointed NuSTAR observations (i.e. slewing observations are NOT included in the data accessed and collected by instances of this class), nor are observations for which the spacecraft mode was ‘STELLAR’. The available observation information is fetched from the HEASArc NuMASTER table, and data are downloaded from the HEASArc https access to their FTP server. Proprietary data are not currently supported by this class.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include FPMA and FPMB (the default is both).
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, credentials=None, download_products=True)[source]
A method to acquire and download the pointed NuSTAR data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
credentials (dict/str) – The path to an ini file containing credentials, a dictionary containing ‘user’ and ‘password’ entries, or a dictionary of ObsID top level keys, with ‘user’ and ‘password’ entries for providing different credentials for different observations.
download_products (bool) – This controls whether the data downloaded include the pre-processed event lists and images stored by HEASArc, or whether they are the original raw event lists. Default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the NuSTARPointed mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – A dictionary with boolean entries for the two FPMs.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.rosat module
- class daxa.mission.rosat.ROSATPointed(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for ROSAT Pointed observations, taken after the initial all-sky survey. This mission includes the follow-up observations taken to complete the all-sky survey in pointed mode towards the end of the ROSAT lifetime. This mission class pulls observation information from the HEASArc ROSMASTER table, and downloads data from the HEASArc website.
NOTE: Follow-up All-Sky observations are marked as being taken with ‘PSPC’ (rather than a specific PSPC-C or B) in the ROSMASTER table, but they were actually taken with PSPC-B, so DAXA corrects the entries on acquisition of the table from HEASArc.
Another mission class is available for ROSAT All-Sky Survey observations, specifically the ones taken in slewing mode with PSPC-C at the beginning of the ROSAT mission.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include PSPCB, PSPCC, and HRI.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property chosen_instruments
Property getter for the names of the currently selected instruments associated with this mission which will be processed into an archive by DAXA functions. Overwritten here because there are custom behaviours for ROSATPointed, as it has one instrument per ObsID.
- Returns:
A list of instrument names.
- Return type:
List[str]
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission. Not completely certain that FK5 is the correct frame for RASS, but a processed image downloaded from HEASArc used FK5 as the reference frame for its WCS.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the ROSAT pointed data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded).
Proprietary data is not a relevant concept for ROSAT at this point, so no option to provide credentials is provided here as it is in some other mission classes.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the HEASArc-published images and exposure maps are downloaded alongside the event lists and attitude files. Setting this to True will download the images/exposure maps. The default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual abstract method which will allow each mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument-subexposure (for missions like XMM) should be processed further for scientific use.
Implemented as an abstract method because the information and decision-making process will likely be different for every mission.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
- class daxa.mission.rosat.ROSATAllSky(save_file_path=None)[source]
Bases:
BaseMissionThe mission class for ROSAT All-Sky Survey (RASS) observations. The available observation information is fetched from the HEASArc RASSMASTER table, and data are downloaded from the HEASArc https access to their FTP server. Only data from the initial scanning phase of RASS will be fetched by this class, not the follow-up pointed mode observations used to complete the survey towards the end of the ROSAT mission.
Another mission class is available for pointed ROSAT observations.
No instrument choice is offered for this mission class because all RASS observations in the scanning portion of the survey were taken with PSPC-C.
- Parameters:
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission. Not completely certain that FK5 is the correct frame for RASS, but a processed image downloaded from HEASArc used FK5 as the reference frame for its WCS.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the ROSAT All-Sky Survey data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded).
Proprietary data is not a relevant concept for RASS, so no option to provide credentials is provided here as it is in some other mission classes.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the HEASArc-published images and exposure maps are downloaded alongside the event lists and attitude files. Setting this to True will download the images/exposure maps. The default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual abstract method which will allow each mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument-subexposure (for missions like XMM) should be processed further for scientific use.
Implemented as an abstract method because the information and decision-making process will likely be different for every mission.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.swift module
- class daxa.mission.swift.Swift(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for observations by the Neil Gehrels Swift Observatory. The available observation information is fetched from the HEASArc SWIFTMASTR table, and data are downloaded from the HEASArc https access to their FTP server. Proprietary data are not currently supported by this class.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include XRT, BAT, and UVOT (the default is both XRT and BAT).
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the Swift data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the data downloaded include the pre-processed event lists and images stored by HEASArc, or whether they are the original raw event lists. Default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the Swift mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.suzaku module
- class daxa.mission.suzaku.Suzaku(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for Suzaku observations, specifically those from the XIS instruments, as XRS’ cooling system was damaged soon after launch, and HXD was not an imaging instrument. The available observation information is fetched from the HEASArc SUZAMASTER table, and data are downloaded from the HEASArc https access to their FTP server.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include XIS0, XIS1, XIS2, and XIS3 (the default is all of them).
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the Suzaku data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the data downloaded include the pre-processed event lists and images stored by HEASArc, or whether they are the original raw event lists. Default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the Suzaku mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.asca module
- class daxa.mission.asca.ASCA(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for ASCA observations, both from the GIS AND SIS instruments. The available observation information is fetched from the HEASArc ASCAMASTER table, and data are downloaded from the HEASArc https access to their FTP server.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include SIS0, SIS1, GIS2, and GIS3 (the default is all of them).
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the ASCA data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – This controls whether the data downloaded include the pre-processed event lists and images stored by HEASArc, or whether they are the original raw event lists. Default is True.
- get_evt_list_path(obs_id, inst=None)[source]
A get method that provides the path to a downloaded pre-generated event list for the current mission (if available). This method will not work if pre-processed data have not been downloaded.
- Parameters:
obs_id (str) – The ObsID of the event list.
inst (str) – The instrument of the event list (if applicable).
- Returns:
The requested event list path.
- Return type:
str
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the ASCA mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.integral module
- class daxa.mission.integral.INTEGRALPointed(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for pointed observations by the INTErnational Gamma-Ray Astrophysics Laboratory (INTEGRAL); i.e. observations taken when the spacecraft isn’t slewing, and is not in an engineering mode (and is public). The available observation information is fetched from the HEASArc INTSCWPUB table, and data are downloaded from the HEASArc https access to their FTP server. Proprietary data are not currently supported by this class.
NOTE - This class treats Science Window IDs as ‘obs ids’, though observation IDs are a separate concept in the HEASArc table at least. The way DAXA is set up however, science window IDs are a closer analogy to the ObsIDs used by the rest of the missions.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include JEMX1, JEMX2, ISGRI, PICsIT, and SPI (the default is JEMX1, JEMX2, and ISGRI). OMC is not supported by DAXA.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, download_products=True)[source]
A method to acquire and download the pointed INTEGRAL data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
There is no download_processed option here because there are no pre-generated products (i.e. images/spectra) to download, though the event lists etc. have gone through some form of processing.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
download_products (bool) – PRESENT FOR COMPATIBILITY WITH OTHER DAXA TASKS - the INTEGRAL archive does not provide pre-processed products for download.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the INTEGRALPointed mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.
mission.xrism module
- class daxa.mission.xrism.XRISMPointed(insts=None, save_file_path=None)[source]
Bases:
BaseMissionThe mission class for pointed XRISM observations, supporting the acquisition of data from both the RESOLVE high-resolution spectrometer, and the XTEND wide-field CCD imager. The available observation information is fetched from the HEASArc XRISMMASTER table, and data are downloaded from the HEASArc https access to their FTP server.
- Parameters:
insts (List[str]/str) – The instruments that the user is choosing to download/process data from. You can pass either a single string value or a list of strings. They may include RESOLVE and XTEND.
save_file_path (str) – An optional argument that can use a DAXA mission class save file to recreate the state of a previously defined mission (the same filters having been applied etc.)
- property name
Property getter for the name of this mission
- Returns:
The mission name.
- Return type:
str
- property coord_frame
Property getter for the coordinate frame of the RA-Decs of the observations of this mission.
- Returns:
The coordinate frame of the RA-Dec.
- Return type:
BaseRADecFrame
- property id_regex
Property getter for the regular expression (regex) pattern for observation IDs of this mission.
- Returns:
The regex pattern for observation IDs.
- Return type:
str
- property fov
Property getter for the approximate field of view set for this mission. This is the radius/half-side-length of the field of view. In cases where the field of view is not square/circular, it is the half-side-length of the longest side.
- Returns:
The approximate field of view(s) for the mission’s instrument(s). In cases with multiple instruments then this may be a dictionary, with keys being instrument names.
- Return type:
Union[Quantity, dict]
- property all_obs_info
A property getter that returns the base dataframe containing information about all the observations available for an instance of a mission class.
- Returns:
A pandas dataframe with (at minimum) the following columns; ‘ra’, ‘dec’, ‘ObsID’, ‘science_usable’, ‘start’, ‘duration’
- Return type:
pd.DataFrame
- download(num_cores=1, credentials=None, download_products=True)[source]
A method to acquire and download the XRISM data that have not been filtered out (if a filter has been applied, otherwise all data will be downloaded). Instruments specified by the chosen_instruments property will be downloaded, which is set either on declaration of the class instance or by passing a new value to the chosen_instruments property.
- Parameters:
num_cores (int) – The number of cores that can be used to parallelise downloading the data. Default is the value of NUM_CORES, specified in the configuration file, or if that hasn’t been set then 90% of the cores available on the current machine.
credentials (dict/str) – The path to an ini file containing credentials, a dictionary containing ‘user’ and ‘password’ entries, or a dictionary of ObsID top level keys, with ‘user’ and ‘password’ entries for providing different credentials for different observations.
download_products (bool) – This controls whether the data downloaded include the pre-processed event lists and images stored by HEASArc, or whether they are the original raw event lists. Default is True.
- assess_process_obs(obs_info)[source]
A slightly unusual method which will allow the XRISM mission to assess the information on a particular observation that has been put together by an Archive (the archive assembles it because sometimes this detailed information only becomes available at the first stages of processing), and make a decision on whether that particular observation-instrument should be processed further for scientific use.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
obs_info (dict) – The multi-level dictionary containing available observation information for an observation.
- ident_to_obsid(ident)[source]
A slightly unusual abstract method which will allow each mission convert a unique identifier being used in the processing steps to the ObsID (as these unique identifiers will contain the ObsID). This is necessary because XMM, for instance, has processing steps that act on whole ObsIDs (e.g. cifbuild), and processing steps that act on individual sub-exposures of instruments of ObsIDs, so the ID could be ‘0201903501M1S001’.
Implemented as an abstract method because the unique identifier style may well be different for different missions - many will just always be the ObsID, but we want to be able to have low level control.
This method should never need to be triggered by the user, as it will be called automatically when detailed observation information becomes available to the Archive.
- Parameters:
ident (str) – The unique identifier used in a particular processing step.