Skip to content

Commit

Permalink
indiclient shutdown causing problems with temp calibrated darks
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronwmorris committed Feb 14, 2024
1 parent e144990 commit 296305b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions indi_allsky/darks.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ def average(self):
self._average()


# shutdown
self.indiclient.disableCcdCooler()
self.indiclient.disconnectServer()


def _average(self):
self._initialize()
self._pre_run_tasks()
Expand All @@ -511,6 +516,11 @@ def tempaverage(self):
self._tempaverage()


# shutdown
self.indiclient.disableCcdCooler()
self.indiclient.disconnectServer()


def _tempaverage(self):
# disable daytime darks processing when doing temperature calibrated frames
self.daytime = False
Expand Down Expand Up @@ -541,12 +551,16 @@ def _tempaverage(self):
self._run(IndiAllSkyDarksAverage)



def sigmaclip(self):
with app.app_context():
self._sigmaclip()


# shutdown
self.indiclient.disableCcdCooler()
self.indiclient.disconnectServer()


def _sigmaclip(self):
self._initialize()
self._pre_run_tasks()
Expand All @@ -559,6 +573,11 @@ def tempsigmaclip(self):
self._tempsigmaclip()


# shutdown
self.indiclient.disableCcdCooler()
self.indiclient.disconnectServer()


def _tempsigmaclip(self):
# disable daytime darks processing when doing temperature calibrated frames
self.daytime = False
Expand Down Expand Up @@ -806,11 +825,6 @@ def _run(self, stacking_class):

remaining_configs -= 1

# shutdown
self.indiclient.disableCcdCooler()
self.indiclient.disconnectServer()



def _take_exposures(self, exposure, dark_filename_t, bpm_filename_t, ccd_bits, stacking_class):
exposure_f = float(exposure)
Expand Down

0 comments on commit 296305b

Please sign in to comment.