fits_data#
- class pyvisgen.fits.fits_data(data_path: str | Path)[source]#
Bases:
objectClass that handles h5 files simulated with the radiosim package.
- Parameters:
- data_path: str or :class:`~pathlib.Path`
path to fits data directory
Methods Summary
__call__()Call self as a function.
get_files(path)Returns a list of files in natural ordering.
Loads frequency data from the file at index
ioffiles.get_uv_data(i)Loads uv data from the file at index
ioffiles.open_file(i)Opens the file and returns the file information.
Methods Documentation
- get_files(path: Path) list[str][source]#
Returns a list of files in natural ordering.
- Parameters:
- pathPath
Path to the data directory.
- Returns:
- fits_files_sortedlist
List of files in natural ordering.
- get_freq_data(i: int) _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str][source]#
Loads frequency data from the file at index
ioffiles.- Parameters:
- iint
Index of the file in
files.
- Returns:
- freq_dataarray_like
Array of frequency data.
- base_freqfloat
Base frequency of the observing antenna array.
- get_uv_data(i: int) _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str][source]#
Loads uv data from the file at index
ioffiles.- Parameters:
- iint
Index of the file in
self.files.
- Returns:
- uv_dataarray_like
Array of uv data.
- open_file(i: int) _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str][source]#
Opens the file and returns the file information.
- Parameters:
- iint
Index of the file in
files.
- Returns:
info()Summary information on the FITS file.