Coder Social home page Coder Social logo

simeonreusch / planobs Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 32.58 MB

Toolset for planning and triggering observations with ZTF, the Zwicky Transient Facility.

Home Page: https://github.com/simeonreusch/planobs

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
astronomy-software

planobs's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar jannisne avatar jvansanten avatar robertdstein avatar simeonreusch avatar

Watchers

 avatar

planobs's Issues

Move away from poetry?

Is your feature request related to a problem? Please describe.
I'm always frustrated when I'm trying to use planobs as a dependency, because the poetry dependency requirements are very strict. It makes it hard to ensure compatibility with other projects.

In general, the poetry model is great for a final-level analysis code which should be exactly reproducible, but bad for generic utility packages which are imported by a lot of other packages. It seems like planobs is in the second category, with three downstream packages so far.

Describe the solution you'd like
I would think the package could be more widely/easily used if either the poetry requirements were substantially loosened, or the entire dependency system was moved to setuptools with minimal constraints on e.g python version <3.12, or pandas ==1.4.x

Describe alternatives you've considered
This might be out of scope, because the package does it's core function fine as is. So things could be left as they are.

Too short observation window raises uncaught exception

Describe the bug
If the airmass requirement is fulfilled, but the resulting observation time is too short for the required observation length and separation between bands, an error occurs.

To Reproduce
Run

from planobs.plan import PlanObservation
PlanObservation(name="IC231211A", alertsource="icecube")

and see traceback:

File ~/Software/planobs/planobs/plan.py:322, in PlanObservation.__init__(self, name, ra, dec, arrivaltime, date, max_airmass, observationlength, bands, multiday, alertsource, obswindow, site, switch_filters, verbose, **kwargs)
    317     self.g_band_recommended_time_start = utils.round_time(
    318         g_band_obsblock[0]
    319     )
    320     self.g_band_recommended_time_end = utils.round_time(g_band_obsblock[-1])
    321     self.r_band_recommended_time_start = utils.round_time(
--> 322         r_band_obsblock[0]
    323     )
    324     self.r_band_recommended_time_end = utils.round_time(r_band_obsblock[-1])
    326 else:

IndexError: list index out of range

Expected behavior
planobs checks for this case and saves something like not observable due to short observation window.

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.