question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Finding discrete events

See original GitHub issue

Hi, In this URL, https://rhodesmill.org/skyfield/searches.html , i see about finding discrete events, but it is for a single value, how can i use the same thing for finding multiple values, say for example , here

def mars_quadrature(t):
  e = earth.at(t)
  s = e.observe(sun).apparent()
  m = e.observe(mars).apparent()
  return s.separation_from(m).degrees >= 90

I want to find mars_quadrature for 50 60 and 90, how can i do that in this function. Any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brandon-rhodescommented, Jul 9, 2021

Generally, separation_from() will never reach zero, so there’s no danger of it happening — but maybe something like (separation_from(…) != 0) * (… the rest of the expression …) would do it, by multiplying everything else by 1 if the separation is non-zero, but multiplying by 0 if it is zero?

1reaction
brandon-rhodescommented, Jul 9, 2021

It’s reporting the “region” into which it’s entering, so “60” means “60-89” and “50” means “50-59”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discrete-event simulation - Wikipedia
A discrete-event simulation (DES) models the operation of a system as a (discrete) sequence of events in time. Each event occurs at a...
Read more >
Discrete Event Simulation
Discrete event simulation (DES) is a method used to model real world systems that can be decomposed into a set of logically separate...
Read more >
What is discrete event simulation (DES)? - TechTarget
Discrete event simulation (DES) is the process of codifying the behavior of a complex system as an ordered sequence of well-defined events.
Read more >
Discrete event lists - YouTube
A brief illustration of how a random process can be represented using a discrete event list. Discrete event simulation models (like AnyLogic ...
Read more >
Basic Concepts of Discrete Event Modeling - GoldSim Help!
A discrete event is something that occurs instantaneously (as opposed to continuously or gradually) in time. It represents a “spike”, a discontinuity, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found