data#
Methods for loading data sets.
- hsr4hci.data.get_field_rotation(parang)[source]#
Compute the field rotation from a given array of parallactic angles.
- hsr4hci.data.load_dataset(name_or_path, binning_factor=1, frame_size=None, remove_planets=False)[source]#
Convenience wrapper to load the stack, the parallactic angles, the PSF template, the observing conditions and the metadata all at once.
- Parameters:
name_or_path (Union[str, Path]) – Name of a data set (e.g., “beta_pictoris__lp”), or Path to an HDF file that contains the data set.
binning_factor (int) – Number of frames that should be temporally binned (“pre-stacked”) using a block-wise mean.
frame_size (Optional[Tuple[int, int]]) – Target frame size to which the stack should be (spatially) cropped.
remove_planets (bool) – If yes, negative fake planets are injected at the positions of the known planets to remove them from the stack. Useful for experiments with fake planets, for which a “clean” stack is required.
- Returns:
The 5-tuple (stack, parang, psf_template, obs_con, metadata).
- Return type:
Tuple[ndarray, ndarray, ndarray, ObservingConditions, Dict[str, Union[str, float]]]
- hsr4hci.data.load_observing_conditions(name_or_path, binning_factor=1, **_)[source]#
Load the observing conditions.
- Parameters:
- Returns:
An object containing the observing conditions.
- Return type:
- hsr4hci.data.load_parang(name_or_path, binning_factor=1, **_)[source]#
Load the parallactic angles.
- Parameters:
- Returns:
A numpy array containing the parallactic angles.
- Return type:
- hsr4hci.data.load_planets(name_or_path, **_)[source]#
Load information about the planets (i.e., positions and contrasts).
- hsr4hci.data.load_stack(name_or_path, binning_factor=1, frame_size=None, remove_planets=False)[source]#
Load the stack.
- Parameters:
name_or_path (Union[str, Path]) – Name of a data set (e.g., “beta_pictoris__lp”), or Path to an HDF file that contains the data set.
binning_factor (int) – Number of frames that should be temporally binned (“pre-stacked”) using a block-wise mean.
frame_size (Optional[Tuple[int, int]]) – Target frame size to which the stack should be (spatially) cropped.
remove_planets (bool) – If yes, negative fake planets are injected at the positions of the known planets to remove them from the stack. Useful for experiments with fake planets, for which a “clean” stack is required.
- Returns:
A 3D numpy array of shape (n_frames, x_size, y_size) that contains the stack after cropping / binning / planet removal.
- Return type: