Skip to content

Commit

Permalink
Import fixes:
Browse files Browse the repository at this point in the history
lightcurve_extraction.py: Add a try/except for newer Astropy versions that have finally removed the old LombScargle code location
core/plots.py: Move (currently unused) import of aplpy import into only routine that uses it.
  • Loading branch information
talister committed May 10, 2024
1 parent 0d7cc57 commit 51a2351
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
except:
pass
from astropy.wcs import FITSFixedWarning
from astropy.stats import LombScargle
try:
from astropy.stats import LombScargle
except ImportError:
from astropy.timeseries import LombScargle
from astropy.time import Time
from django.conf import settings
from django.core.files.storage import default_storage
Expand Down
3 changes: 3 additions & 0 deletions neoexchange/core/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ def make_visibility_plot(request, pk, plot_type, start_date=None, site_code='-1'


# def make_plot(request):
#
# import aplpy
#
#
# fits_file = 'cpt1m010-kb70-20160428-0148-e91.fits'
# fits_filepath = os.path.join('/tmp', 'tmp_neox_9nahRl', fits_file)
#
Expand Down

0 comments on commit 51a2351

Please sign in to comment.