ACID-code-v2 0.2.0a1__tar.gz → 0.2.2a1__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.
Files changed (106) hide show
  1. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.github/workflows/publish.yml +1 -1
  2. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/PKG-INFO +1 -1
  3. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2/ACID.py +8 -3
  4. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2/LSD.py +3 -4
  5. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2/mcmc_utils.py +1 -1
  6. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2/utils.py +0 -1
  7. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2.egg-info/PKG-INFO +1 -1
  8. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2.egg-info/SOURCES.txt +0 -1
  9. acid_code_v2-0.2.0a1/.github/workflows/python-app.yml +0 -35
  10. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.gitattributes +0 -0
  11. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.gitignore +0 -0
  12. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.other_scripts/5_residual_profiles.py +0 -0
  13. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.other_scripts/8_master_out_profiles.py +0 -0
  14. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.readthedocs.yaml +0 -0
  15. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/.vscode/launch.json +0 -0
  16. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/LICENSE +0 -0
  17. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/README.md +0 -0
  18. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/acid.yml +0 -0
  19. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/ACID.rst +0 -0
  20. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/conf.py +0 -0
  21. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/index.rst +0 -0
  22. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/installation.rst +0 -0
  23. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/make.bat +0 -0
  24. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/requirements.txt +0 -0
  25. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/docs/using_ACID.rst +0 -0
  26. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/.make_syn_dat.py +0 -0
  27. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/example_linelist.txt +0 -0
  28. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/sample_spec_1.fits +0 -0
  29. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/sample_spec_2.fits +0 -0
  30. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/sample_spec_3.fits +0 -0
  31. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/example/tutorial_code.py +0 -0
  32. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/pyproject.toml +0 -0
  33. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/setup.cfg +0 -0
  34. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2/__init__.py +0 -0
  35. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2.egg-info/dependency_links.txt +0 -0
  36. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2.egg-info/requires.txt +0 -0
  37. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/src/ACID_code_v2.egg-info/top_level.txt +0 -0
  38. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/.DS_Store +0 -0
  39. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_blaze_B.fits +0 -0
  40. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_flat_A.fits +0 -0
  41. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_flat_B.fits +0 -0
  42. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_lamp_A.fits +0 -0
  43. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_lamp_B.fits +0 -0
  44. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-28T21:11:56.678_order_profile.fits +0 -0
  45. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_bis_G2_A.fits +0 -0
  46. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_bis_G2_B.fits +0 -0
  47. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_bis_K5_A.fits +0 -0
  48. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_ccf_G2_A.fits +0 -0
  49. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_ccf_G2_B.fits +0 -0
  50. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_ccf_K5_A.fits +0 -0
  51. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_e2ds_A.fits +0 -0
  52. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_e2ds_B.fits +0 -0
  53. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_s1d_A.fits +0 -0
  54. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:02:50.897_s1d_B.fits +0 -0
  55. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_bis_G2_A.fits +0 -0
  56. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_bis_G2_B.fits +0 -0
  57. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_bis_K5_A.fits +0 -0
  58. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_ccf_G2_A.fits +0 -0
  59. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_ccf_G2_B.fits +0 -0
  60. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_ccf_K5_A.fits +0 -0
  61. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_e2ds_A.fits +0 -0
  62. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_e2ds_B.fits +0 -0
  63. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_s1d_A.fits +0 -0
  64. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:08:22.216_s1d_B.fits +0 -0
  65. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_bis_G2_A.fits +0 -0
  66. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_bis_G2_B.fits +0 -0
  67. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_bis_K5_A.fits +0 -0
  68. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_ccf_G2_A.fits +0 -0
  69. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_ccf_G2_B.fits +0 -0
  70. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_ccf_K5_A.fits +0 -0
  71. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_e2ds_A.fits +0 -0
  72. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_e2ds_B.fits +0 -0
  73. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_s1d_A.fits +0 -0
  74. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:13:54.107_s1d_B.fits +0 -0
  75. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_bis_G2_A.fits +0 -0
  76. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_bis_G2_B.fits +0 -0
  77. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_bis_K5_A.fits +0 -0
  78. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_ccf_G2_A.fits +0 -0
  79. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_ccf_G2_B.fits +0 -0
  80. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_ccf_K5_A.fits +0 -0
  81. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_e2ds_A.fits +0 -0
  82. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_e2ds_B.fits +0 -0
  83. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_s1d_A.fits +0 -0
  84. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:19:25.377_s1d_B.fits +0 -0
  85. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_bis_G2_A.fits +0 -0
  86. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_bis_G2_B.fits +0 -0
  87. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_bis_K5_A.fits +0 -0
  88. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_ccf_G2_A.fits +0 -0
  89. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_ccf_G2_B.fits +0 -0
  90. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_ccf_K5_A.fits +0 -0
  91. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_e2ds_A.fits +0 -0
  92. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_e2ds_B.fits +0 -0
  93. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_s1d_A.fits +0 -0
  94. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:24:57.238_s1d_B.fits +0 -0
  95. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_bis_G2_A.fits +0 -0
  96. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_bis_G2_B.fits +0 -0
  97. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_bis_K5_A.fits +0 -0
  98. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_ccf_G2_A.fits +0 -0
  99. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_ccf_G2_B.fits +0 -0
  100. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_ccf_K5_A.fits +0 -0
  101. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_e2ds_A.fits +0 -0
  102. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_e2ds_B.fits +0 -0
  103. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_s1d_A.fits +0 -0
  104. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/data/HARPS.2007-08-29T00:30:28.617_s1d_B.fits +0 -0
  105. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/tests.py +0 -0
  106. {acid_code_v2-0.2.0a1 → acid_code_v2-0.2.2a1}/tests/tutorial_test.py +0 -0
@@ -5,7 +5,7 @@ on:
5
5
  - 'v*'
6
6
  jobs:
7
7
  build:
8
- runs-on: ubuntu-latest
8
+ runs-on: macos-latest
9
9
  steps:
10
10
  - uses: actions/checkout@v3
11
11
  - uses: actions/setup-python@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ACID_code_v2
3
- Version: 0.2.0a1
3
+ Version: 0.2.2a1
4
4
  Summary: Returns line profiles from input spectra by fitting the stellar continuum and performing LSD
5
5
  Author: Lucy Dolan
6
6
  Author-email: Benjamin Cadell <bcadell01@qub.ac.uk>
@@ -800,7 +800,14 @@ def ACID(input_wavelengths, input_spectra, input_spectral_errors, line, frame_sn
800
800
  return all_frames
801
801
 
802
802
  def ACID_HARPS(filelist, line, vgrid, order_range=None, save_path = './', file_type = 'e2ds', **kwargs):
803
- """_summary_
803
+ """Accurate Continuum fItting and Deconvolution for HARPS e2ds and s1d spectra (DRS pipeline 3.5)
804
+
805
+ Fits the continuum of the given spectra and performs LSD on the continuum corrected spectra,
806
+ returning an LSD profile for each file given. Files must all be kept in the same folder as well
807
+ as their corresponding blaze files. If 's1d' are being used their e2ds equivalents must also be
808
+ in this folder. Result files containing profiles and associated errors for each order (or
809
+ corresponding wavelength range in the case of 's1d' files) will be created and saved to a
810
+ specified folder. It is recommended that this folder is seperate to the input files.
804
811
 
805
812
  Parameters
806
813
  ----------
@@ -886,5 +893,3 @@ def ACID_HARPS(filelist, line, vgrid, order_range=None, save_path = './', file_t
886
893
  errors.append(result2)
887
894
 
888
895
  return BJDs, profiles, errors
889
-
890
-
@@ -1,13 +1,12 @@
1
1
  import numpy as np
2
2
  from scipy import linalg
3
3
  from astropy.io import fits
4
- import glob, time, warnings, sys, psutil
4
+ import glob, time, warnings, sys, psutil, os
5
5
  import scipy.constants as const
6
6
  import matplotlib.pyplot as plt
7
7
  from scipy.signal import find_peaks
8
8
  from scipy.interpolate import interp1d, LSQUnivariateSpline
9
9
  from tqdm import tqdm
10
- import os
11
10
  ckms = float(const.c/1e3) # speed of light in km/s
12
11
 
13
12
  def LSD(wavelengths, flux_obs, rms, linelist, adjust_continuum, poly_ord, sn,
@@ -199,9 +198,9 @@ def continuumfit(wavelengths1, fluxes1, poly_ord):
199
198
 
200
199
  return flux_obs
201
200
 
202
- # from MM-LSD code - give credit if needed
203
201
  def upper_envelope(x, y):
204
- #used to compute the tapas continuum. find peaks then fit spline to it.
202
+ # from MM-LSD code - give credit if needed
203
+ # used to compute the tapas continuum. find peaks then fit spline to it.
205
204
  peaks = find_peaks(y, height=0.2, distance=len(x) // 500)[0]
206
205
  # t= knot positions
207
206
  spl = LSQUnivariateSpline(x=x[peaks], y=y[peaks], t=x[peaks][5::10])
@@ -1,5 +1,5 @@
1
1
  import numpy as np
2
- from ACID_code_v2.ACID import model_func
2
+ from .ACID import model_func
3
3
 
4
4
 
5
5
  class Model:
@@ -21,7 +21,6 @@ def ensure_list(x, allow_none=False):
21
21
  else:
22
22
  raise TypeError("Input must be a list or numpy array")
23
23
 
24
-
25
24
  def round_sig(x1, sig):
26
25
  return round(x1, sig-int(floor(log10(abs(x1))))-1)
27
26
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ACID_code_v2
3
- Version: 0.2.0a1
3
+ Version: 0.2.2a1
4
4
  Summary: Returns line profiles from input spectra by fitting the stellar continuum and performing LSD
5
5
  Author: Lucy Dolan
6
6
  Author-email: Benjamin Cadell <bcadell01@qub.ac.uk>
@@ -6,7 +6,6 @@ README.md
6
6
  acid.yml
7
7
  pyproject.toml
8
8
  .github/workflows/publish.yml
9
- .github/workflows/python-app.yml
10
9
  .other_scripts/5_residual_profiles.py
11
10
  .other_scripts/8_master_out_profiles.py
12
11
  .vscode/launch.json
@@ -1,35 +0,0 @@
1
- # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
-
4
- name: Python application
5
-
6
- on:
7
- push:
8
- branches: [ "main" ]
9
- pull_request:
10
- branches: [ "main" ]
11
-
12
- permissions:
13
- contents: read
14
-
15
- jobs:
16
- build:
17
-
18
- runs-on: macos-latest
19
- steps:
20
- - uses: actions/checkout@v3
21
- - name: Set up Python 3.7
22
- uses: actions/setup-python@v3
23
- with:
24
- python-version: "3.7"
25
- - name: Install dependencies
26
- run: |
27
- python -m pip install --upgrade pip
28
- pip install pytest
29
- git clone https://github.com/ldolan05/ACID.git
30
- cd ACID
31
- python -m pip install -e .
32
- if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
33
- - name: Test with pytest
34
- run: |
35
- pytest tests/*
File without changes
File without changes
File without changes
File without changes