AGB Star Deprojection
A package for visualising radially expanding circumstellar envelopes of AGB stars.
Quick Start
Installation
python3 -m pip install agb_star_deprojection_methods
Import
from agb_star_deprojection_methods.classes import CondensedData, StarData
Initialise a StarData object
fits_file = "example_fits_file.fits" # relative path to fits file
distance_to_star = 8.04e8 # distance to star in AU
rest_frequency = 2.3e11 # rest frequency in Hz
star = StarData(fits_file, distance_to_star, rest_frequency)
Plot channel maps (opens in matplotlib window)
star.plot_channel_maps() # many optional arguments
Plot 3D deprojection using plotly
star.plot_3D() # many optional arguments
Export to a CondensedData object
data = star.export()
Tweak parameters and create a new StarData object
data.v_exp = 20
new_star = StarData(data)
Expand envelope over time
years = 1000
info = new_star(years) # CondensedData object representing the envelope in 1000 years
expanded_star = StarData(info)
Save animation frame-by-frame to a folder
path_to_folder = "animation/frames"
star.plot_3D(folder = path_to_folder, num_angles = 100)
Creating a Mask
To create a mask manually, use the following script:
from agb_star_deprojection_methods.classes import StarData
fits_file = "example_fits_file.fits"
distance_to_star = 8.04e8
rest_frequency = 2.3e11
star = StarData(fits_file, distance_to_star, rest_frequency)
stds = 3 # number of standard deviations to initially filter by
savefile = "trial_mask.npy" # .npy file to save mask to
# open mask selector
star.create_mask(filter_stds=stds, savefile=savefile)
Running this will open a matplotlib window with a subplot for each velocity channel.
- Double click inside a subplot, then drag to lasso points.
- When you finish dragging, press:
- A to keep only these points in the mask,
- R to remove these points from the mask,
- Enter to do neither.
- Once you have completed the mask, close the matplotlib application.
- The mask will be saved to the location specified by
savefile.
To load the star data with the mask:
from agb_star_deprojection_methods.classes import StarData
fits_file = "example_fits_file.fits"
distance_to_star = 8.04e8
rest_frequency = 2.3e11
maskfile = "trial_mask.npy" # .npy file to load mask from
star = StarData(fits_file, distance_to_star, rest_frequency, maskfile)
# any other operations you want done
# ...
Further Reading
See our report and more detailed documentation at https://psychedelickoala.github.io/agb-star-deprojection-docs/AGB-Star-Deprojection.html.
Metadata
Release files for agb-star-deprojection-methods 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agb_star_deprojection_methods-0.0.3.tar.gz | 20.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agb_star_deprojection_methods-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.1 kB
Release files / agb_star_deprojection_methods-0.0.3.tar.gz
| Download URL | agb_star_deprojection_methods-0.0.3.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c1f278f9a7525de42e7911feb1525650a6a588d8e84b0e5f631337a932c76d5
|
|
BLAKE2b-256 checksum How to use checksums |
c856d2a64bf9168b3791b501ab6d4ebdc39d91e5b1b68d2dd3b5ee0247f760a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Release files / agb_star_deprojection_methods-0.0.3-py3-none-any.whl
| Download URL | agb_star_deprojection_methods-0.0.3-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8f5cd6cf5eb70c7fdd21b0f766e52f380d06ddd29f731f3f59e8fe6f3ea1f2f
|
|
BLAKE2b-256 checksum How to use checksums |
5eec96e2a3f71300f461869ed87bb7dd9db28ef46ff44aa1cac3b9ff07483a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.4
|
Security for agb-star-deprojection-methods 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.