tessapps 0.2.7__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tessapps-0.2.7 → tessapps-0.2.8}/PKG-INFO +16 -16
- {tessapps-0.2.7 → tessapps-0.2.8}/README.md +8 -8
- {tessapps-0.2.7 → tessapps-0.2.8}/pyproject.toml +5 -3
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/__init__.py +1 -1
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/main.py +1 -1
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/nearby_stars_to_data.py +4 -2
- {tessapps-0.2.7 → tessapps-0.2.8}/LICENSE +0 -0
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/__main__.py +0 -0
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/data_to_contamination.py +0 -0
- {tessapps-0.2.7 → tessapps-0.2.8}/src/tessapps/tpf_to_nearby_stars.py +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tessapps
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: TESS Aperture Photometry Pollution eStimator
|
|
5
5
|
Author: Leonidas Liponis
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
9
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: numpy
|
|
11
|
-
Requires-Dist: scipy
|
|
12
|
-
Requires-Dist: matplotlib
|
|
13
|
-
Requires-Dist: astropy
|
|
14
|
-
Requires-Dist: astroquery
|
|
15
|
-
Requires-Dist: lightkurve
|
|
10
|
+
Requires-Dist: numpy>=1.21.2
|
|
11
|
+
Requires-Dist: scipy>=1.7.2
|
|
12
|
+
Requires-Dist: matplotlib>=3.5
|
|
13
|
+
Requires-Dist: astropy>=5.0
|
|
14
|
+
Requires-Dist: astroquery>=0.4.6
|
|
15
|
+
Requires-Dist: lightkurve>=2.0
|
|
16
16
|
Requires-Dist: bump-my-version ; extra == "dev"
|
|
17
17
|
Requires-Dist: flit ; extra == "dev"
|
|
18
18
|
Project-URL: Homepage, https://codeberg.org/leolip128/tessapps
|
|
@@ -40,21 +40,21 @@ Full documentation is available [here](https://codeberg.org/leolip128/tessapps/s
|
|
|
40
40
|
|
|
41
41
|
Mandatory:
|
|
42
42
|
|
|
43
|
-
- ```numpy``` (
|
|
44
|
-
- ```scipy``` (1.
|
|
45
|
-
- ```astropy``` (
|
|
46
|
-
- ```astroquery``` (0.4.
|
|
43
|
+
- ```numpy``` (>=1.21.2): to make all calculations
|
|
44
|
+
- ```scipy``` (>=1.7.2): to integrate the gaussian function
|
|
45
|
+
- ```astropy``` (>=5.0): to build data used in this module
|
|
46
|
+
- ```astroquery``` (>=0.4.6): to find stars in the target's region
|
|
47
|
+
- ```matplotlib``` (>=3.5): to plot the result (shows aperture mask with a caption at the bottom)
|
|
47
48
|
|
|
48
49
|
Optional:
|
|
49
50
|
|
|
50
|
-
- ```lightkurve``` (2.
|
|
51
|
-
- ```matplotlib``` (3.10.8): to plot the result (shows aperture mask with a caption at the bottom)
|
|
51
|
+
- ```lightkurve``` (>=2.0): to fetch tpf files (unless they already exist locally)
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Python >=3.10 is required. The above are the earliest vesrions that have been found to work. Intermediate versions have not been individually checked, and testing proceeds with the latest versions of each dependency. More information can be found [here](https://codeberg.org/leolip128/tessapps/src/branch/main/documentation/installation).
|
|
54
54
|
|
|
55
55
|
### Package
|
|
56
56
|
|
|
57
|
-
To install, run ```pip install tessapps```. More info about installation can be found
|
|
57
|
+
To install, run ```pip install tessapps```. More info about installation can be found at the above link.
|
|
58
58
|
|
|
59
59
|
## Running the module
|
|
60
60
|
|
|
@@ -18,21 +18,21 @@ Full documentation is available [here](https://codeberg.org/leolip128/tessapps/s
|
|
|
18
18
|
|
|
19
19
|
Mandatory:
|
|
20
20
|
|
|
21
|
-
- ```numpy``` (
|
|
22
|
-
- ```scipy``` (1.
|
|
23
|
-
- ```astropy``` (
|
|
24
|
-
- ```astroquery``` (0.4.
|
|
21
|
+
- ```numpy``` (>=1.21.2): to make all calculations
|
|
22
|
+
- ```scipy``` (>=1.7.2): to integrate the gaussian function
|
|
23
|
+
- ```astropy``` (>=5.0): to build data used in this module
|
|
24
|
+
- ```astroquery``` (>=0.4.6): to find stars in the target's region
|
|
25
|
+
- ```matplotlib``` (>=3.5): to plot the result (shows aperture mask with a caption at the bottom)
|
|
25
26
|
|
|
26
27
|
Optional:
|
|
27
28
|
|
|
28
|
-
- ```lightkurve``` (2.
|
|
29
|
-
- ```matplotlib``` (3.10.8): to plot the result (shows aperture mask with a caption at the bottom)
|
|
29
|
+
- ```lightkurve``` (>=2.0): to fetch tpf files (unless they already exist locally)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Python >=3.10 is required. The above are the earliest vesrions that have been found to work. Intermediate versions have not been individually checked, and testing proceeds with the latest versions of each dependency. More information can be found [here](https://codeberg.org/leolip128/tessapps/src/branch/main/documentation/installation).
|
|
32
32
|
|
|
33
33
|
### Package
|
|
34
34
|
|
|
35
|
-
To install, run ```pip install tessapps```. More info about installation can be found
|
|
35
|
+
To install, run ```pip install tessapps```. More info about installation can be found at the above link.
|
|
36
36
|
|
|
37
37
|
## Running the module
|
|
38
38
|
|
|
@@ -9,14 +9,16 @@ license = {file = "LICENSE"}
|
|
|
9
9
|
classifiers = ["License :: OSI Approved :: MIT License"]
|
|
10
10
|
dynamic = ["version", "description"]
|
|
11
11
|
readme = "README.md"
|
|
12
|
-
requires-python = ">=3.
|
|
13
|
-
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
|
|
14
|
+
dependencies = [
|
|
15
|
+
"numpy>=1.21.2", "scipy>=1.7.2", "matplotlib>=3.5", "astropy>=5.0", "astroquery>=0.4.6", "lightkurve>=2.0"]
|
|
14
16
|
|
|
15
17
|
[project.optional-dependencies]
|
|
16
18
|
dev = ["bump-my-version", "flit"]
|
|
17
19
|
|
|
18
20
|
[tool.bumpversion]
|
|
19
|
-
current_version = "0.2.
|
|
21
|
+
current_version = "0.2.8"
|
|
20
22
|
commit = false
|
|
21
23
|
tag = false
|
|
22
24
|
allow_dirty = true
|
|
@@ -13,7 +13,6 @@ from astropy.coordinates import SkyCoord
|
|
|
13
13
|
from astropy.wcs.utils import proj_plane_pixel_scales
|
|
14
14
|
from astroquery.mast import Catalogs
|
|
15
15
|
|
|
16
|
-
import matplotlib.pyplot as plt
|
|
17
16
|
from pathlib import Path
|
|
18
17
|
from argparse import ArgumentParser
|
|
19
18
|
|
|
@@ -30,6 +29,7 @@ def run(tpf=None, pixel_overshoot=1, sigma=1, digits=3, info=False, result=False
|
|
|
30
29
|
# print(data[:6])
|
|
31
30
|
|
|
32
31
|
if plot:
|
|
32
|
+
import matplotlib.pyplot as plt
|
|
33
33
|
fig, ax = plt.subplots(figsize=(8, 8))
|
|
34
34
|
tpf.plot(ax=ax, aperture_mask=tpf.pipeline_mask)
|
|
35
35
|
text = f"The background contributes ({100 * contamination_factor} ± {100 * contamination_error})% of the total flux in the aperture region."
|
|
@@ -27,7 +27,8 @@ def flux_calculator(tmag, tmag_error): # this function find
|
|
|
27
27
|
|
|
28
28
|
def data_builder(tpf, stars): # this function uses the above 2 functions to make a table containing relevant data
|
|
29
29
|
tic, positions, tmag, tmag_error = stars_to_raw_data(stars) # first it calculates the stars' (ra, dec) positions and extracts Tmag
|
|
30
|
-
|
|
30
|
+
mean_time = Time(tpf.time.jd.mean(), format="jd", scale=tpf.time.scale) # or mean_time = Time(tpf.time.mean())
|
|
31
|
+
positions = positions.apply_space_motion(new_obstime=mean_time) # the above does not work with astropy 5.0, only with newer versions
|
|
31
32
|
flux, flux_error = flux_calculator(tmag, tmag_error) # then it finds the flux of each star
|
|
32
33
|
x, y = tpf.wcs.world_to_pixel(positions) # and their positions in pixels
|
|
33
34
|
|
|
@@ -39,7 +40,8 @@ def data_builder(tpf, stars): # this function
|
|
|
39
40
|
data["x"].info.format = ".2f" # x and y pixel positions are considered not to have error because it is too small to be important
|
|
40
41
|
data["y"].info.format = ".2f" # and would make error propagation difficult when calculating the gaussians
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
removed_stars = (~np.isfinite(data['flux'])).sum() # remove stars that do not have a flux in the data (hasn't happened yet)
|
|
44
|
+
if removed_stars != 0: print(f"{removed_stars} of {len(data)} stars removed (missing flux)") # print this in case it does
|
|
43
45
|
|
|
44
46
|
data = data[np.isfinite(data["flux"])] # filter out NaN cases, substitute with 0 (where there are no values for Tmag, rare)
|
|
45
47
|
is_target = np.asarray(data["TIC"]) == int(tpf.targetid) # get the target star's position in the list
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|