EranOfek / AstroPack

Astronomy & Astrophysics Software Pacakge
Other
19 stars 4 forks source link

`telescope.Scheduler.selectTarget` failing to find target in time range [JD,Inf] #515

Closed EastEriq closed 2 weeks ago

EastEriq commented 2 weeks ago

Consider the attached ToO.csv file, which contains three targets for mount 5. ToO.csv Now:

>> S= telescope.Scheduler;
>> S.loadTable('ToO.csv')

Note that:

>> format longg
>> [S.List.Catalog.StartJD, S.List.Catalog.StopJD]

ans =

                         0              2460622.3125
              2460622.3125                 2460622.5
                 2460622.5                       Inf

However,

>> S.selectTarget(2460622.2,'MountNum',5,'SelectMethod','minam')

ans =

     1

>> S.selectTarget(2460622.31,'MountNum',5,'SelectMethod','minam')

ans =

     []

>> S.selectTarget(2460622.4,'MountNum',5,'SelectMethod','minam')

ans =

     2

>> S.selectTarget(2460622.5,'MountNum',5,'SelectMethod','minam')

ans =

     []

>> S.selectTarget(2460622.6,'MountNum',5,'SelectMethod','minam')

ans =

     []

>> S.selectTarget(2460622.7,'MountNum',5,'SelectMethod','minam')

ans =

     []

I don't see an obvious reason in the table why the third target should not be found. Do you? (I imagine that .31does not return a target just because there is no time to complete the visit before .3125)

EastEriq commented 2 weeks ago

Is it that target 3 is never visible during this night, perhaps?

EastEriq commented 2 weeks ago

hm, the following night

>> S.selectTarget(2460623.4,'MountNum',5,'SelectMethod','minam')

ans =

     3

>> S.selectTarget(2460623.5,'MountNum',5,'SelectMethod','minam')

ans =

     3

@RuslanKonno, @EranOfek ?

EranOfek commented 2 weeks ago

The targets have different RA and Dec and therefore has different visibility windows, which are not related to Start/Stop JD...