AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

`IndexError` in `take_observation_block` #516

Closed danjampro closed 2 years ago

danjampro commented 2 years ago
IndexError                                Traceback (most recent call last)
<ipython-input-2-f1260f26c241> in <module>
----> 1 pocs.observatory.take_dark_observation()

/opt/conda/lib/python3.9/site-packages/huntsman/pocs/observatory.py in take_dark_observation(self, bias, **kwargs)
    512
    513         # Take the observation (blocking)
--> 514         self.take_observation_block(observation, do_focus=False, do_slew=False,
    515                                     safety_kwargs=safety_kwargs, **kwargs)
    516

/opt/conda/lib/python3.9/site-packages/huntsman/pocs/observatory.py in take_observation_block(self, observation, cameras, timeout, remove_on_error, do_focus, safety_kwargs, do_slew)
    482                 observation.mark_exposure_complete()
    483
--> 484             self.logger.info(f"Observation status: {observation.status}")
    485
    486     def take_dark_observation(self, bias=False, **kwargs):

/opt/conda/lib/python3.9/site-packages/huntsman/pocs/scheduler/observation/base.py in status(self)
    112             'equinox': self.field.equinox,
    113             'exp_set_size': self.exp_set_size,
--> 114             'exptime': self.exptime.value,
    115             'field_dec': self.field.coord.dec.value,
    116             'field_name': self.name,

/opt/conda/lib/python3.9/site-packages/huntsman/pocs/scheduler/observation/dark.py in exptime(self)
     48     @property
     49     def exptime(self):
---> 50         exptime = self._exptime[self.current_exp_num]
     51         return get_quantity_value(exptime, u.second) * u.second
     52

/opt/conda/lib/python3.9/site-packages/astropy/units/quantity.py in __getitem__(self, key)
   1039     def __getitem__(self, key):
   1040         try:
-> 1041             out = super().__getitem__(key)
   1042         except IndexError:
   1043             # We want zero-dimensional Quantity objects to behave like scalars,

IndexError: index 5 is out of bounds for axis 0 with size 5