A package for managing astronomical data through a uniform interface
Project description
A package for managing astronomical data through a uniform interface
astrodata is a package for managing astronomical data through a uniform interface. It is designed to be used with the Astropy package. astrodata was designed by and for use as part of the DRAGONS data reduction pipeline, but it is now implemented to be useful for any astronomical data reduction or analysis project.
Unlike managing files using the astropy.io.fits package alone, astrodata is designed to be extendible to any data format, and to parse, respond to, and store metadata in a consistent, intentional way. This makes it especially useful for managing data from multiple instruments, telescopes, and data generation utilities.
Note: If you are trying to reduce Gemini data, please use DRAGONS. Interaction with this package directly is primarily suited for developers, and does not come with any tools for data reduction on any specific instrument or data.
Installation
astrodata is available on PyPI and can be installed using pip:
pip install astrodata
Usage
The most basic usage of astrodata is to extend the astrodata.AstroData class, which includes some basic FITS file handling methods by default:
from astrodata import AstroData
class MyData(AstroData):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def my_method(self):
print('This is my method, and it tells me about my data.')
print(self.info())
data = MyData.read('my_file.fits')
data.my_method()
This will print out the header of the FITS file, as well as the filename and path of the file (as it does for astropy.io.fits objects).
astrodata is designed to be extendible, so you can add your own methods to
Documentation
Documentation for astrodata is available at astrodata documentation. This documentation includes a user and programmer’s guide, as well as a full API reference.
Installing development dependencies
astrodata uses Poetry for build and package management. To install development dependencies, you must clone this repository. Once you have, at the top level directory of the astrodata repository run
pip -m install poetry
poetry install
# To install without specific development groups
poetry install --without test,docs,dev
License
This project is Copyright 2024 (c) and licensed under the terms of the BSD 3-clause license. This package is based upon the Openastronomy packaging guide which is licensed under the BSD 3-clause licence. See the LICENSE folder for more information.
Contributing
We love contributions! astrodata is open source, built on open source, and we’d love to have you hang out in our community.
Imposter syndrome disclaimer: We want your help. No, really.
There may be a little voice inside your head that is telling you that you’re not ready to be an open source contributor; that your skills aren’t nearly good enough to contribute. What could you possibly offer a project like this one?
We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one’s coding skills. Writing perfect code isn’t the measure of a good developer (that would disqualify all of us!); it’s trying to create something, making mistakes, and learning from those mistakes. That’s how we all improve, and we are happy to help others learn.
Being an open source contributor doesn’t just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you’re coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.
Note: This disclaimer was originally written by Adrienne Lowe for a PyCon talk, and was adapted by astrodata based on its use in the README file for the MetPy project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file astrodata-2.9.1.dev1.tar.gz
.
File metadata
- Download URL: astrodata-2.9.1.dev1.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.8.2 CPython/3.10.13 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f10f2c6cd84f2e9034887b29755d9555893561fc2741ef0557d07c0d5c3584de
|
|
MD5 |
c97bef73490befc1eed725b583bc7c93
|
|
BLAKE2b-256 |
f52866a08ab34445710147487e894a353171c907523bb14a874a80d6709bed7d
|
File details
Details for the file astrodata-2.9.1.dev1-py3-none-any.whl
.
File metadata
- Download URL: astrodata-2.9.1.dev1-py3-none-any.whl
- Upload date:
- Size: 65.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: poetry/1.8.2 CPython/3.10.13 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b3507c7738ce6ea3bcef0896796ca49bea8de3437a6ccc55902937d031b511d4
|
|
MD5 |
66f81532372571c49b26a3db28316801
|
|
BLAKE2b-256 |
c4d6f9fda1417c5d7b34a6f4a1a286b11ee6106658a34ae647dae10915d8454e
|