Skip to content

Commit

Permalink
delete the --cov in yaml github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ebachelet committed Jan 13, 2025
1 parent c2b1582 commit 94ceb85
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: Test with PyTest
run: |
python3 -m pytest --cov=inflammation.models tests/test_models.py
python3 -m pytest tests/test_models.py
8 changes: 5 additions & 3 deletions microlensing_photometry/astrometry/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ def refine_image_wcs(image, stars_image, image_wcs, gaia_catalog, star_limit = 1
stars_positions = np.array(star_pix).T

model_gaia_image = image_tools.build_image(stars_positions, fluxes, image.shape,
image_fraction=1)
image_fraction=1,star_limit = star_limit)

model_image = image_tools.build_image(stars_image[:,:2], [1]*len(stars_image), image.shape, image_fraction=1)
model_image = image_tools.build_image(stars_image[:,:2], [1]*len(stars_image), image.shape, image_fraction=1,
star_limit = star_limit)

shiftx, shifty = find_images_shifts(model_gaia_image, model_image, image_fraction=0.25, upsample_factor=1)

shiftx, shifty = find_images_shifts(model_gaia_image, model_image, image_fraction=0.25, upsample_factor=1)
print(shiftx,shifty)
dists = sspa.distance.cdist(stars_image[:star_limit,:2],
np.c_[star_pix[0][:star_limit] - shiftx, star_pix[1][:star_limit] - shifty])
mask = dists < 10
Expand Down
1 change: 0 additions & 1 deletion microlensing_photometry/logistics/image_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def build_image(star_positions, fluxes, image_shape, image_fraction = 0.25, star
XX, YY = np.indices((21, 21))

model_gaussian = psf.Gaussian2d(1, XX.max()/2, XX.max()/2, 3, 3, XX, YY)

model_image = np.zeros(image_shape)

for ind in range(len(sub_star_positions)):
Expand Down
7 changes: 6 additions & 1 deletion microlensing_photometry/photometry/aperture_photometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ def process_image(self):
"""
Process the image following the various steps
"""

import time
start = time.time()
self.log.info('Start Image Processing')

self.find_star_catalog()
print(time.time()-start)
self.refine_wcs()
print(time.time()-start)

self.run_aperture_photometry()
print(time.time()-start)

def find_star_catalog(self):
"""
Expand Down

0 comments on commit 94ceb85

Please sign in to comment.