SNEWS2 / snewpdag

SNEWS2 alert calculations
BSD 3-Clause "New" or "Revised" License
2 stars 13 forks source link

Adding a "starting time" feature into Uniform.py #79

Closed HermanEiTse closed 2 years ago

HermanEiTse commented 2 years ago

Adding a small feature "starting time" to the uniform generator.

mcolomermolla commented 2 years ago

Comment: in the other generators, I remember the starting time (T0) to be in ms and not in seconds, let's unify this.

tsengj10 commented 2 years ago

I agree, let's go with the names "tmin" and "tmax" as they are clearer, since "start" is already a feature of the time objects. tmin and tmax are also probably more natural arguments, rather than tmin/start and duration.

As for interpretation: tmin and tamx should specify offsets in seconds, relative to the reference time of the TimeSeries or TimeHist object.

If a part of the region specified by (tmin,tmax) falls outside the range of the time object (TimeSeries or TimeHist), ignore those parts of the region.

If tmin or tmax fall within a bin of a TimeHist, rather than at a bin edge, then fill that bin with the appropriate fraction.

One should try to make sure the generator behaves appropriately for both a TimeSeries and TimeHist.

tsengj10 commented 2 years ago

In preparation for CM changes, going to merge soon