-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #575 from kevin218/dev/kbs
Increment to v0.10
- Loading branch information
Showing
37 changed files
with
241 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
name = eureka | ||
author = Eureka! pipeline developers | ||
author_email = [email protected] | ||
description = A data reduction and analysis pipeline intended for time-series observations with the JWST. | ||
description = A data reduction and analysis pipeline intended for time-series observations with JWST. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
license = MIT License | ||
license_file = LICENSE | ||
license_files = [LICENSE,] | ||
url = https://github.com/kevin218/Eureka | ||
project_urls = | ||
Bug Tracker = https://github.com/kevin218/Eureka/issues | ||
|
@@ -23,8 +23,6 @@ package_dir = | |
packages = find: | ||
zip_safe = True | ||
python_requires= >=3.8 | ||
setup_requires = | ||
cython | ||
install_requires = | ||
astraeus@git+https://github.com/kevin218/Astraeus@main | ||
astropy | ||
|
@@ -35,7 +33,6 @@ install_requires = | |
celerite # Needed for GP | ||
corner | ||
crds | ||
cython | ||
dynesty>1.0 # Lower limit needed for specific arguments | ||
emcee>3.0.0 # Lower limit needed for specific arguments | ||
exotic-ld | ||
|
@@ -60,7 +57,7 @@ where = src | |
|
||
[options.extras_require] | ||
jwst = | ||
jwst==1.10.2 | ||
jwst==1.11.4 | ||
stcal>=1.0.0 # Lower limit needed for our create_integration_model function | ||
hst = | ||
image_registration@git+https://github.com/keflavich/image_registration@master # Need GitHub version to avoid np.float issue | ||
|
@@ -87,6 +84,7 @@ pymc3 = | |
opencv-python<4.8 # Upper limit needed for numpy<1.22 | ||
opencv-python-headless<4.8 # Upper limit needed for numpy<1.22 | ||
scipy>=1.4.0,<1.8.0 # Lower limit needed for scipy.fft, upper limit needed for theano, starry, and pymc3 | ||
xarray<2023.10.0 # Upper limit needed for numpy<1.22 | ||
jupyter = | ||
jupyter | ||
ipykernel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
#!/usr/bin/env python | ||
from setuptools import setup | ||
from Cython.Build import cythonize | ||
|
||
if __name__ == "__main__": | ||
|
||
setup( | ||
ext_modules=cythonize( | ||
["src/eureka/S3_data_reduction/niriss_cython.pyx"]), | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import numpy as np | ||
|
||
def build_image_models(data, A, B, sig, mu1, mu2, return_together=True): | ||
|
||
y = np.transpose(np.full((len(A), data.shape[-1], data.shape[0]), | ||
np.arange(0,data.shape[0],1)), axes=(0,2,1)) | ||
|
||
sig = np.full(y.T.shape, sig).T | ||
|
||
A = np.full(y.T.shape, A).T | ||
exp = np.exp(-(y-mu1)**2/(2.0*sig**2)) | ||
gauss = 1.0/(2.0*np.pi*np.sqrt(sig))*exp | ||
f1x = mu1*gauss*A | ||
|
||
B = np.full(y.T.shape, B).T | ||
exp = np.exp(-(y-mu2)**2/(2.0*sig**2)) | ||
gauss = 1.0/(2.0*np.pi*np.sqrt(sig))*exp | ||
f2x = mu2*gauss*B | ||
|
||
model = f1x+f2x | ||
sigma = np.nansum(np.sqrt((model-data)**2.0), axis=(1,2)) | ||
|
||
if return_together: | ||
return model, sigma | ||
else: | ||
return f1x, f2x, sigma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.