No project description provided
Project description
sparse3d
This package contains implimentations of a class for working with data that looks like a single large sparse image containing small regions of dense data. Really, this is designed for working with astronomical images.
What is sparse3D
?
We often have large images in astronomy that might look like the sketch below. In this sketch we have a large, sparse image with 4 dense regions; A, B, C, and D. In astronomy we have this situation often, where we have small images of point like stars spread over large images.
+-------------------------------------+
| |
| +-----+ +-----+ |
| | | | | |
| | A | | B | |
| | | | | |
| +-----+ +-----+ |
| |
| +-----+ |
| | | |
| +-----+ | C | |
| | | | | |
| | D | +-----+ |
| | | |
| +-----+ * |
| |
+-------------------------------------+
We may wish to calculate a model for star brightness in each of these regions. In this case, we likely do not care about the value of the model outside these regions, e.g. at the point in the image indicated by *
. However, our model may still be based on where we are within this larger image.
Because of this, it is efficient for us to take this image and cast it into a sparse representation using scipy
's sparse
library.
Unfortunately sparse
does not easily enable us to do this, as it only allows 2D arrays.
This small repository implements a way that we can hold the data corresponding to each of the sub images inside of a sparse array, by "unwrapping" the indices for the sub images and insetting them in the larger, sparse image.
To Do
- Add an example using real data
- Update tests for ROISparse class, and add a notebook demonstration
- Update the ROISparse class to ensure the outputs are 3D if dotted with a 1D array.
- Implement a
fit
function?
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 sparse3d-1.0.0.tar.gz
.
File metadata
- Download URL: sparse3d-1.0.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.13 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeac894e264d4c59538f2e670b7e64bfdbcf6293fe64b89619de9dcc06a71914 |
|
MD5 | ff8b6f1ccab7e712065bc7090e5f0c5e |
|
BLAKE2b-256 | 4768d7f984e0758acf8a1755befc093f7cfc9cd30597cee400a907697db9108d |
File details
Details for the file sparse3d-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: sparse3d-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.13 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad82462e197e15ca022816d2ab8e0d764cda0cd1a839311a15126b38edbf501 |
|
MD5 | 80867b6b9a97d700abf686ec0a1b1cc2 |
|
BLAKE2b-256 | 42643d9109d3e5750661e6dcbea4d97590fb334fed72c14b67e5c21f7a7fd253 |