simpunch.util#
Utility functions.
Functions#
|
Update the spacecraft location metadata. |
|
Write an array to a FITS file using compression. |
|
Generate stray light arrays for B and pB channels for WFI and NFI instruments. |
|
Determine where to put a file. |
|
Add some extra default values to a NormalizedMetadata instance. |
Module Contents#
- simpunch.util.update_spacecraft_location(input_data: ndcube.NDCube, time_obs: astropy.time.Time) ndcube.NDCube[source]#
Update the spacecraft location metadata.
- simpunch.util.write_array_to_fits(path: str, image: numpy.ndarray, overwrite: bool = True) None[source]#
Write an array to a FITS file using compression.
- simpunch.util.generate_stray_light(shape: tuple, instrument: str = 'WFI', pstate: str = 'both') numpy.ndarray | tuple[numpy.ndarray, numpy.ndarray][source]#
Generate stray light arrays for B and pB channels for WFI and NFI instruments.
- Parameters:
shape (-)
instrument (-)
pstate (-)
- Returns:
- strayarray_B (2D numpy array, intensity for B channel.)
- strayarray_pB (2D numpy array, intensity for pB channel.)