Use cases for SGM from the target SMARTS projects: Science goals and SGM
actions

1.  **Monitoring X-ray binaries**

This is an ideal use case for SGM because it needs to monitor an event
and capture it as effectively and efficiently as possible.

-   **Science goal:** Monitor X-ray Binary outbursts to understand the
    accretion phenomenon. In this project it is very important to
    capture the outburst as soon as possible and then to monitor the
    flare with the highest possible observing frequency at multiple
    wavelengths. Note that the highest possible frequency for the SMARTS
    program purposes would be once a day.

-   **Target source:** X-ray binaries which are identified by the
    various alert strategies, i.e. IAU circulars, astrophysics alerts
    etc.

-   **What is the event that is being monitored:** Catch an outburst by
    noting a dramatic increase in magnitude. The rise in the outburst
    should be captured as fast as possible and the outburst should be
    observed as completely as possible.

-   **Number of targets in program:** multiple

-   **Is there specific data analysis that can be automated:** Yes.
    Monitor magnitude changes in specific wavebands to determine the
    start of an outburst.

-   **What action should SGM be expected to take:** Science campaign
    timing details are**:**

1.  *Monitor target by observing once a day* in one of the following
    filters: B, V, R, I, J, H, K

2.  *Determine if target is in outburst.* Outburst needs to be defined
    as follows:

    a.  The outburst could be deemed to have started if the magnitude of
        the target has risen by 0.5 from the quiescent level. Now, if
        you were observing a target once per day, it may take three days
        (three observations) for the magnitude to increase by this much.
        If you are only observing every third day then you may notice
        the increase on consecutive observations. So it is not enough to
        say \"If magnitude in observation *n* \> 0.5+ magnitude in
        observation *n-1\...\" as it may take two or three observations
        to notice the outburst, depending upon the frequency of
        observations and/or the rate of increase of the outburst. What
        you would need to do is to ascertain the quiescent
        (differential) magnitude and with each new observation see if
        this differs by 0.5 mags or more.* This step determines if an
        event is about to happen. If this is true then the next step
        confirms that there is a flare and the rise in magnitude
        detected is not a noisy observation.

    b.  Start of outburst needs to be confirmed by increasing the
        observing frequency to once a day (if it is greater than once a
        day) and then determining if the new observation is greater than
        0.5 mag from the quiescent state. Note that a target in outburst
        could be added as a target of opportunity and for such a target
        this step of how an outburst is defined is not necessary.

    c.  SGM will need some sort of initial categorization of a target at
        start of campaign to determine -- (a) baseline magnitude, (b)
        target already in outburst or not, etc.

    d.  Presuming that when a target is in outburst, it would mean more
        frequent observations, what happens to priorities or frequency
        of observations for other targets in the campaign? This will
        have to be specified by the PI for priorities within their own
        program. Specifically for this XRB program, when an XRB goes
        into outburst, then the XRBs which get dropped or have less
        frequent observations will be those that are currently in
        quiescence. NOTE this does not necessarily mean they are the
        faintest targets!!

3.  *If target in out burst there are a number of activities that need
    to be done.*

    a.  *Change observing strategy*. When in outburst, observe with the
        highest frequency (i.e. once a day) recommended by the PI and
        multiple filters suggested by the PI.

    b.  *Adjust exposure time*. Notify PI who can then adjust exposure
        accordingly. The exposure times may change as the outburst
        evolves and SGM would have to adjust for this. As per the PI,
        the exposure time wouldn\'t change often, in fact, probably only
        once at the start of outburst and then at the end of outburst.
        What is more important is that, when an X-ray binary goes from
        quiescence into an outburst, we would change the exposure time
        once and increase the number of filters. For example, we may be
        observing in only the V-band during quiescence but choose to
        observe in B, V and I during outburst. Likewise, when it goes
        into quiescence, we would again change the exposure time and
        decrease the number of filters.

    c.  *Send alerts to other telescopes* when an outburst has been
        detected for additional observations. Would also want to notify
        X-ray and radio astronomers that an outburst was occurring. This
        would be done via the IAU Circulars and/or Astronomer\'s
        Telegram.

4.  *Capture the complete outburst.* Consider the outburst fully
    captured when target magnitude is once again the same as (meaning
    with in delta 0.2 mag) the magnitude in quiescence. There could be
    other complex ways of defining the complete outburst but this as the
    simplest case.

5.  *End the campaign when target is unreachable*, is too faint or has
    become low priority and there is insufficient time (too many
    targets) to observe it.

    a.  *Do not terminate program!* Program should not be terminated if
        there is any indication that there might be a new event that has
        started. This has to be checked not only in the wavelength
        regions monitored by SGM but also by checking in other
        wavelength regions, if the object is being monitored
        simultaneously. But if, say, it is being monitored in X-rays and
        the target becomes unreachable by the optical telescope we will
        have no choice but to terminate observations.

    b.  If target becomes too faint change exposure time so that time is
        not wasted on useless data. These details need to be provided by
        the PI. For example, even after changing exposure time, the S/N
        in the data are very low, one may have to change the observing
        frequency. If the original observing frequency is once a day,
        change that to every other day, OR once a week, or drop the
        target out of the list. The observing frequency can also be
        increased if the target seems to brighten. Deleting a target
        from the list would be the very last choice.

Note that scientifically it is not possible to predict when an outburst
will happen, so objects need to be monitored at all times, both during
quiescence and outbursts. There have been a few cases where an outburst
happened after many years in quiescence. Multiple outbursts occurred
soon there after which was quite unexpected. So, the only time that we
would end observing a target is if the target has become too faint or is
out of reach (that is, moved into daylight hours) or there are more
targets with higher priorities and we cannot fit all targets into the
schedule.

2.  **Monitoring extragalactic Supernovae (SN)**

This is another good use case for SGM but with very different science
needs when compared to the XRBs.

-   **Science goal:** Follow the optical and infrared light curve
    evolution of a set of nearby extragalactic supernovae

-   **Target type:** Supernovae of all types, including separate
    standard star fields.

-   **What is the event that is being monitored:**

1.  The supernovae will be discovered by other ongoing supernova
    searches -- typically the Supernova Factory, LOTOSS, and amateur
    discoveries. These are announced on an email exploder from the IAUC
    prior to official announcement.

2.  Then the supernova will be observed once every day for 30 days, and
    then once every week till the object reaches brightness minimum for
    the instrumentation. The exposures must have a Signal-to-Noise
    ration = XX. (see below)

3.  On photometric nights, a single standard field will be observed.
    Once three photometric nights are used, the standards will no longer
    be observed. The standards will be chosen automatically from a list
    of standards, by finding the closest standard (in airmass and time)
    to the object just before, or just after, the SN observation. Note
    that the standard fields for the IR and the optical are different --
    two fields must be observed each photometric night to calibrate the
    optical and IR channels.

-   **Number of targets in program:** multiple

-   **Is there specific data analysis that can be automated:** Yes

1.  The optical data can be reduced to \[OTZF\] -- Over-scan, trimmed,
    zero (bias) corrected, and flat-fielded automatically using the
    nearest (in time) facility flat fields and bias frames.

2.  The IR reductions can be partially automated. The dark frames can be
    subtracted from the data. The flat-fielding, however, depends on the
    dither pattern and may change from object to object.

-   **What action should SGM take:** Response time from notification to
    first observation must be the same night. NOTE: this implies that we
    will need to have the supporting simulation software and decision
    making process to be very fast, so that we can decide which
    observation/target to drop from the schedule. The cadence of the
    observations will depend on what type of supernova it is. Here is a
    simple decision process. The supernova type will come from other
    spectroscopic observations.

3.  If the SN is a Type Ia, Type Ib/c, Type IIL, or unknown: Observe
    every 3 days for the first month, and every 7 days for the next two
    months. Observe until SN is 4mag from peak in V, or until it reaches
    19^th^ mag in V.

4.  For Type IIP: Observe every day if caught early for up to 6 days;
    every 3 days for up to 2 weeks; and every 10 days thereafter.

5.  No more than 16 visits per object.

6.  Drop U exposure if 10min exposure (on a clear night) does not detect
    the object at 5-sigma.

7.  Special IR dark frames must be scheduled in the afternoon whenever
    the SN observations are scheduled.

8.  The exposure times are set by the IR and U observations. For bright
    SNe, we observe in YJHK simultaneously with the UBVRI observations.
    For fainter SNe, we only observe in H and BVRI. It will be hard to
    automate the exact exposure times, but I can provide rough expected
    times. The hardest part for scheduling the telescope is the precise
    position of the SN in the IR field. Right now, only 2/3rds of the IR
    field is usable due to internal vignette. The SN and a check star
    must be placed in this field in such a way that the telescope can be
    offset either N/S or E/W using small offsets. Typically we offset 5
    times at about 5-10" each time. Because the field is small, we can
    never tell which direction to offset until I study the field using
    the DSS.

9.  The exposure times should be calculated so that BVRI magnitudes have
    S/N=100, YJH=0.025, and K=0.03. The U magnitude should have S/N=20,
    but at late times this is not possible. As stated above, however,
    one cannot easily calculate the exposure times based just on the SN
    magnitude. For instance, the local standard in the IR field may be
    brighter than the SN, and we have to reduce the exposure time
    because this star will saturate. Once the exposure times are set in
    the first observations, they can be easily scaled for the rest of
    the observations of the SN.

10. We will need to have some software to calculate a quick magnitude in
    V to monitor the SN with respect to a local standard. The magnitude
    of the local standard can be taken from the USNO catalog.

```{=html}
<!-- -->
```
3.  **Monitoring Gamma Ray Bursts (GRBs)**

This program is very interesting as it raises questions on how SGM and
the scheduler interact with each other. In this program SGM's task will
be more as a task manager for the observing night. The challenge will be
to reconfigure the already existing queue to allow for the interpolated
observations of the GRB.

-   **Science goal:** Observe GRBs as soon as discovered

-   **Target source:** GRBs detected by X-ray missions

-   **What is the event that is being monitored:** The GRBs once
    discovered get observed at a frequency determined by the PI.

-   **Number of targets in program:** multiple

-   **Is there specific data analysis that can be automated**: No

-   **What action should SGM be expected to take**:

1.  When a burst is discovered, the SGM will be alerted via an e-mail or
    SGM can monitor a web page.

2.  A pre-arranged sequence of observations must then be implemented
    immediately. This sequence will take about 2 hours right away.

3.  The target will have to be re-observed later in the night, costing
    perhaps one additional hour.

-   **The scheduling problem raised by the GRB observations:**

1.  The preliminary baseline plan could be to simply leave out the
    targets\
    scheduled for the time used for the GRB observation. But of course
    this is far from optimal - it may be that the top priority objects
    for the night have been scheduled for that time.

2.  To account for the GRB disruptions, there is a need for a scheduling
    tool that could reconfigure the night's schedule taking into account
    the two interpolated GRB observations and the other priority
    observations for the night. The requirements on the tool are that it
    run fast so that while the first GRB observation is being conducted
    the new schedule is ready.

3.  It should be noted that such a tool would be useful in other
    contexts as well. For example, it is frequently the case that
    weather closes us down for PART of a night - it would be great if
    the observers could insert a gap for that reason, and get back an
    optimally configured queue for the rest of the night.

4.  To implement a adaptive scheduling tool we will need

    a.  Knowledge of the gaps that will arise during the night

    b.  Priority of the targets for that nights schedule

    c.  Ability to determine if the target is observable in the
        remaining part of the night.

    d.  Knowledge of which targets can be moved to another night

5.  Note that a full blown schedule does not have to be developed; one
    just needs to adjust the part of the night that is in question.

6.  ASPEN/CASPER could be very useful here, as this scheduling tool is
    supposed to have the ability to fine tune the schedule to events.