punchbowl.data.punch_io#
Attributes#
Functions#
|
Create a SHA-256 hash for a file. |
|
Determine the base file name without file type extension. |
|
Write an NDCube as a JPEG2000 file. |
|
Write an NDCube as a FITS file. |
|
Compress the uncertainty for writing to file. |
|
Uncompress the uncertainty when reading from a file. |
|
Update image statistics in metadata before writing to file. |
|
Load an NDCube from a FITS file. |
Module Contents#
- punchbowl.data.punch_io._ROOT = b'.'#
- punchbowl.data.punch_io.write_file_hash(path: str) None#
Create a SHA-256 hash for a file.
- punchbowl.data.punch_io.get_base_file_name(cube: ndcube.NDCube) str#
Determine the base file name without file type extension.
- punchbowl.data.punch_io.write_ndcube_to_jp2(cube: ndcube.NDCube, filename: str, layer: int | None = None, vmin: float = 1e-15, vmax: float = 8e-13) None#
Write an NDCube as a JPEG2000 file.
- punchbowl.data.punch_io.write_ndcube_to_fits(cube: ndcube.NDCube, filename: str, overwrite: bool = True, write_hash: bool = True, skip_stats: bool = False, uncertainty_quantize_level: float = 16) None#
Write an NDCube as a FITS file.
- punchbowl.data.punch_io._pack_uncertainty(cube: ndcube.NDCube) numpy.ndarray#
Compress the uncertainty for writing to file.
- punchbowl.data.punch_io._unpack_uncertainty(uncertainty_array: numpy.ndarray, data_array: numpy.ndarray) numpy.ndarray#
Uncompress the uncertainty when reading from a file.
- punchbowl.data.punch_io._update_statistics(cube: ndcube.NDCube) None#
Update image statistics in metadata before writing to file.
- punchbowl.data.punch_io.load_ndcube_from_fits(path: str | pathlib.Path, key: str = ' ', include_provenance: bool = True) ndcube.NDCube#
Load an NDCube from a FITS file.