Skip to main content

FITSDataset

PyPI version PyPI - Downloads

This package contains a custom PyTorch Dataset for quick and easy training on FITS files, commonly used in astronomical data analysis. In particular, the FITSDataset class caches FITS files as PyTorch tensors for the purpose of increasing training speed.

Contributions and feedback are welcome; please open a pull request or an issue.

Quickstart

Using Python 3.6+, install from source with

pip install fitsdataset

Create a toy dataset with samples from the Hyper Suprime-Cam survey with:

>>> from fitsdataset import FITSDataset
>>> dataset = FITSDataset("path/to/examples/hsc/", size=101, label_col="target")

Notice that the cached tensors appear in path/to/examples/hsc/tensors.

Preparing a dataset

Prepare your own FITS dataset by creating the following directory structure:

path/to/data/
  info.csv
  cutouts/
    img1.fits
    img2.fits
    ...

where info.csv has a filename column (basename) and a prediction target column. See here for an example.

Documentation

>>> from fitsdataset import FITSDataset
>>> help(FITSDataset)

Metadata

Release files for fitsdataset 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fitsdataset 0.0.3
File Size Uploaded
fitsdataset-0.0.3.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fitsdataset 0.0.3
File Interpreter ABI Platform
fitsdataset-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / fitsdataset-0.0.3.tar.gz

Download URL fitsdataset-0.0.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f1df6cd40e49fd37aacabb6a08c228ff72db3a1d0bceeed83d3bb6bee0df8bd7
BLAKE2b-256 checksum
How to use checksums
03639e6f9f9ddd66e9dfbe0804823d987b6292bcbc9d2c151ce4164d5036f123
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.16

Release files / fitsdataset-0.0.3-py3-none-any.whl

Download URL fitsdataset-0.0.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e80741c3f45921828eb9ba0edc2b5d5936f7e1bd422db9d3575d4bcc53f9ec3
BLAKE2b-256 checksum
How to use checksums
20e4c7c9ba0d983d27c4a899fd638fd4dc563d8c4e388cb2c394b414ab52867a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page