Coder Social home page Coder Social logo

lcogt / banzai Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 18.0 17.1 MB

Beautiful Algorithms to Normalize Zillions of Astronomical Images

License: GNU General Public License v3.0

Python 97.29% C 0.58% Dockerfile 0.19% Mustache 1.25% Cython 0.69%
backend

banzai's People

Contributors

adrn avatar astrofrog avatar bsipocz avatar cdeil avatar cmccully avatar dmcollom avatar drhaz avatar ebachelet avatar eheinrich avatar embray avatar eteq avatar fingel avatar gmbrandt avatar hamogu avatar jashan-lco avatar kbarbary avatar keflavich avatar larrybradley avatar mdboom avatar mgdaily avatar mnorbury avatar mwcraig avatar nvolgenau avatar pk0207 avatar pllim avatar rachel3834 avatar svalenti avatar turnerm avatar wkerzendorf avatar xuiris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

banzai's Issues

WCS solve fails for globular clusters

A user is having issues getting WCS solves on images of globular clusters (dense fields with many possible saturated sources). He created a video of changes he'd like to request we make to our banzai.astrometry.py, specifically the SOURCE_LIMIT=50 parameter. This parameter got changed in 2021 from 200 to 50. Our documentation still says 200. Is there any way we can help this person get his solves?

Question: Python 2 or 3?

Maybe a silly question, but are you running this code in Python 2 or 3? I did not found this info in the docs...

Thanks!

reduce_single_frame does not work

main.reduce_single_frame always crashes on this line:

if not image_utils.image_can_be_processed(fits_utils.get_primary_header(runtime_context.path), runtime_context):

fits_utils.get_primary_header returns an astropy.io.fits.Header object, but image_utils.image_can_be_processed expects an ObservationFrame object for the image argument, because it checks image.obstype, for example.

problem with sinistro reduction

Traceback (most recent call last):
File "/science/supernova/github/pylcogt/pylcogt/pylcogtmain.py", line 113, in
pylcogt.utils.lcogtsteps.run_makebias(listbias, _output, minimages=5)
File "/home/supernova/lib/python2.7/site-packages/pylcogt-0.0.dev185-py2.7.egg/pylcogt/utils/lcogtsteps.py", line 125, in run_makebias
biasdata[i, :, :] = pyfits.getdata(f)[:, :]
ValueError: output operand requires a reduction, but reduction is not enabled

error making flat

Traceback (most recent call last):
File "/science/supernova/github/pylcogt/pylcogt/pylcogtmain.py", line 125, in
pylcogt.utils.lcogtsteps.run_makeflat(listflat, _output, minimages=5)
File "/home/supernova/lib/python2.7/site-packages/pylcogt-0.0.dev178-py2.7.egg/pylcogt/utils/lcogtsteps.py", line 253, in run_makeflat
flatdata[i, :, :] /= imagemode(flatdata[i],200)
File "/home/supernova/lib/python2.7/site-packages/pylcogt-0.0.dev178-py2.7.egg/pylcogt/utils/lcogtsteps.py", line 164, in imagemode
gp.fit(X, y)
File "/opt/epd/lib/python2.7/site-packages/sklearn/gaussian_process/gaussian_process.py", line 296, in fit
if np.min(np.sum(D, axis=1)) == 0.
File "/opt/epd/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 1895, in amin
return amin(axis, out)
ValueError: zero-size array to minimum.reduce without identity

flux computed in ellipses rotated by pi/2 instead of theta

In photometry.py, line 90 to 94, the fluxes of the sources are computed in ellipses that are all rotated by pi/2.
See code snippet below:

# Calcuate the equivilent of flux_auto
flux, fluxerr, flag = sep.sum_ellipse(data, sources['x'], sources['y'],
                                      sources['a'], sources['b'],
                                      np.pi / 2.0, 2.5 * kronrad,
                                      subpix=1, err=error)

The same is passed to sep.sum_ellipse when computing background fluxes in the ellipses (line 141 to 144):

# Calculate the average background at each source
bkgflux, fluxerr, flag = sep.sum_ellipse(bkg.back(), sources['x'], sources['y'],
                                         sources['a'], sources['b'], np.pi / 2.0,
                                         2.5 * sources['kronrad'], subpix=1)

This might be a bug, as the ellipse parameters of the extracted sources are (a,b,theta), so each aperture is rotated by a different angle theta. If this is indeed a bug, suggested solutions would be:

# Calcuate the equivilent of flux_auto
flux, fluxerr, flag = sep.sum_ellipse(data, sources['x'], sources['y'],
                                      sources['a'], sources['b'],
                                      sources['theta'], 2.5 * kronrad,
                                      subpix=1, err=error)

# Calculate the average background at each source
bkgflux, fluxerr, flag = sep.sum_ellipse(bkg.back(), sources['x'], sources['y'],
                                         sources['a'], sources['b'], sources['theta'],
                                         2.5 * sources['kronrad'], subpix=1)

Makebias crash.

1m0-11
makebias
['20141130']
['coj1m011-kb05-20141130-0052-e00.fits'
'coj1m011-kb05-20141130-0051-e00.fits'
'coj1m011-kb05-20141130-0053-e00.fits'
'coj1m011-kb05-20141130-0061-e00.fits'
'coj1m011-kb05-20141130-0060-e00.fits'
'coj1m011-kb05-20141130-0054-e00.fits'
'coj1m011-kb05-20141130-0084-f00.fits'
'coj1m011-kb05-20141130-0083-f00.fits'
'coj1m011-kb05-20141130-0082-f00.fits'
'coj1m011-kb05-20141130-0081-f00.fits'
'coj1m011-kb05-20141130-0080-f00.fits']
select bias and make bias
Traceback (most recent call last):
File "/science/supernova/github/pylcogt/pylcogt/pylcogtmain.py", line 104, in
listfile = [k + v for k, v in zip(ll0['filepath'][ww], ll0['filename'][ww])]
IndexError: arrays used as indices must be of integer (or boolean) type
/home/supernova/lib/python2.7/site-packages/pylcogt-0.0.dev189-py2.7.egg/pylcogt/utils/pymysql.py:108: Warning: Data truncated for column 'dateobs' at row 1
cursor.execute(sql, values)

MNT: Stop using ci-helpers in appveyor.yml

To whom it may concern,

If you are using https://github.com/astropy/ci-helpers in your appveyor.yml , please know that the Astropy project has dropped active development/support for Appveyor CI. If it still works, good for you, because we did not remove the relevant files (yet). But if it ever stops working, we have no plans to fix anything for Appveyor CI. Please consider using native Windows support other CI, e.g., Travis CI (see https://docs.travis-ci.com/user/reference/windows/). We apologize for any inconvenience caused.

If this issue is opened in error or irrelevant to you, feel free to close. Thank you.

xref astropy/ci-helpers#464

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.