From 8b7ada71b40c5c7387d24df7e8f43e880c4f7808 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Sun, 11 Feb 2024 19:20:42 -0600 Subject: [PATCH 1/5] minor update to temp handling --- indi_allsky/darks.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/indi_allsky/darks.py b/indi_allsky/darks.py index e15dbee3..2db55502 100644 --- a/indi_allsky/darks.py +++ b/indi_allsky/darks.py @@ -519,24 +519,24 @@ def _tempaverage(self): self._pre_run_tasks() - current_temp = self.getSensorTemperature() - next_temp_thold = current_temp - self.temp_delta + self.getSensorTemperature() + next_temp_thold = self.sensortemp_v.value - self.temp_delta # get first set of images self._run(IndiAllSkyDarksAverage) while True: # This loop will run forever, it is up to the user to cancel - current_temp = self.getSensorTemperature() + self.getSensorTemperature() logger.info('Next temperature threshold: %0.1f', next_temp_thold) - if current_temp > next_temp_thold: + if self.sensortemp_v.value > next_temp_thold: time.sleep(20.0) continue logger.warning('Acheived next temperature threshold') - next_temp_thold = next_temp_thold - self.temp_delta + next_temp_thold -= self.temp_delta self._run(IndiAllSkyDarksAverage) @@ -567,24 +567,24 @@ def _tempsigmaclip(self): self._pre_run_tasks() - current_temp = self.getSensorTemperature() - next_temp_thold = current_temp - self.temp_delta + self.getSensorTemperature() + next_temp_thold = self.sensortemp_v.value - self.temp_delta # get first set of images self._run(IndiAllSkyDarksSigmaClip) while True: # This loop will run forever, it is up to the user to cancel - current_temp = self.getSensorTemperature() + self.getSensorTemperature() logger.info('Next temperature threshold: %0.1f', next_temp_thold) - if current_temp > next_temp_thold: + if self.sensortemp_v.value > next_temp_thold: time.sleep(20.0) continue logger.warning('Acheived next temperature threshold') - next_temp_thold = next_temp_thold - self.temp_delta + next_temp_thold -= self.temp_delta self._run(IndiAllSkyDarksSigmaClip) From 2e499f7cdd6fec7928a422ca1bae384f041612f0 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Mon, 12 Feb 2024 15:28:35 -0600 Subject: [PATCH 2/5] update file paths for DPC --- misc/libcamera_enable_dpc.sh | 53 ++++++++++---- setup.sh | 133 +++++------------------------------ 2 files changed, 58 insertions(+), 128 deletions(-) diff --git a/misc/libcamera_enable_dpc.sh b/misc/libcamera_enable_dpc.sh index be2c7408..6b18610f 100755 --- a/misc/libcamera_enable_dpc.sh +++ b/misc/libcamera_enable_dpc.sh @@ -1,6 +1,5 @@ #!/bin/bash - #set -x # command tracing set -o errexit set -o nounset @@ -21,6 +20,8 @@ DPC_STRENGTH="1" ### +LIBCAMERA_PREFIX="/usr" + echo echo "#########################################################" @@ -32,6 +33,15 @@ echo echo +if [[ -f "/usr/local/bin/libcamera-still" || -f "/usr/local/bin/rpicam-still" ]]; then + LIBCAMERA_PREFIX="/usr/local" + + echo "Detected a custom installation of libcamera in /usr/local" + echo + echo + sleep 3 +fi + if [[ "$(id -u)" == "0" ]]; then echo @@ -69,21 +79,40 @@ LIBCAMERA_CAMERAS=" " for LIBCAMERA_JSON in $LIBCAMERA_CAMERAS; do - JSON_FILE="/usr/share/libcamera/ipa/raspberrypi/${LIBCAMERA_JSON}.json" + ### PI4 and older + JSON_FILE_VC4="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/vc4/${LIBCAMERA_JSON}.json" + + ### PI5 + JSON_FILE_PISP="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/pisp/${LIBCAMERA_JSON}.json" - if [ -f "$JSON_FILE" ]; then - echo "Enabling dpc in $JSON_FILE" - TMP_JSON=$(mktemp) - jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE" > "$TMP_JSON" - sudo cp -f "$TMP_JSON" "$JSON_FILE" - sudo chown root:root "$JSON_FILE" - sudo chmod 644 "$JSON_FILE" - [[ -f "$TMP_JSON" ]] && rm -f "$TMP_JSON" + if [ -f "$JSON_FILE_VC4" ]; then + echo "Disabling dpc in $JSON_FILE_VC4" + + TMP_DPC_JSON_VC4=$(mktemp --suffix=.json) + jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_VC4" > "$TMP_DPC_JSON_VC4" + sudo cp -f "$TMP_DPC_JSON_VC4" "$JSON_FILE_VC4" + sudo chown root:root "$JSON_FILE_VC4" + sudo chmod 644 "$JSON_FILE_VC4" + [[ -f "$TMP_DPC_JSON_VC4" ]] && rm -f "$TMP_DPC_JSON_VC4" else - echo "File not found: $JSON_FILE" + echo "File not found: $JSON_FILE_VC4" fi -done + if [ -f "$JSON_FILE_PISP" ]; then + echo "Disabling dpc in $JSON_FILE_PISP" + + TMP_DPC_JSON_PISP=$(mktemp --suffix=.json) + jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_PISP" > "$TMP_DPC_JSON_PISP" + sudo cp -f "$TMP_DPC_JSON_PISP" "$JSON_FILE_PISP" + sudo chown root:root "$JSON_FILE_PISP" + sudo chmod 644 "$JSON_FILE_PISP" + [[ -f "$TMP_DPC_JSON_PISP" ]] && rm -f "$TMP_DPC_JSON_PISP" + else + echo "File not found: $JSON_FILE_PISP" + fi + + +done diff --git a/setup.sh b/setup.sh index c262f128..bf721f7e 100755 --- a/setup.sh +++ b/setup.sh @@ -48,7 +48,6 @@ MIGRATION_FOLDER="$DB_FOLDER/migrations" USE_MYSQL_DATABASE="${INDIALLSKY_USE_MYSQL_DATABASE:-false}" CAMERA_INTERFACE="${INDIALLSKY_CAMERA_INTERFACE:-}" -DPC_STRENGTH="0" INSTALL_INDI="${INDIALLSKY_INSTALL_INDI:-true}" INSTALL_LIBCAMERA="${INDIALLSKY_INSTALL_LIBCAMERA:-false}" @@ -79,15 +78,6 @@ ASTROBERRY="false" #### end config #### -### libcamera Defective Pixel Correction (DPC) Strength -# https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf -# -# 0 = Off -# 1 = Normal correction (default) -# 2 = Strong correction -### - - function catch_error() { echo echo @@ -165,7 +155,7 @@ if [[ -f "/etc/astroberry.version" ]]; then echo - if which whiptail; then + if which whiptail >/dev/null 2>&1; then if ! whiptail --title "WARNING" --yesno "Astroberry is no longer supported. Please use Raspbian or Ubuntu.\n\nDo you want to proceed anyway?" 0 0 --defaultno; then exit 1 fi @@ -280,7 +270,7 @@ while [ -z "${CAMERA_INTERFACE:-}" ]; do PS3="Select a camera interface: " select camera_interface in indi libcamera indi_passive pycurl_camera; do if [ -n "$camera_interface" ]; then - CAMERA_INTERFACE=$camera_interface + CAMERA_INTERFACE="$camera_interface" break fi done @@ -288,12 +278,14 @@ while [ -z "${CAMERA_INTERFACE:-}" ]; do # more specific libcamera selection if [ "$CAMERA_INTERFACE" == "libcamera" ]; then + INSTALL_LIBCAMERA="true" + echo PS3="Select a libcamera interface: " select libcamera_interface in libcamera_imx477 libcamera_imx378 libcamera_ov5647 libcamera_imx219 libcamera_imx519 libcamera_imx708 libcamera_imx296_gs libcamera_imx290 libcamera_imx462 libcamera_64mp_hawkeye; do if [ -n "$libcamera_interface" ]; then # overwrite variable - CAMERA_INTERFACE=$libcamera_interface + CAMERA_INTERFACE="$libcamera_interface" break fi done @@ -301,8 +293,15 @@ while [ -z "${CAMERA_INTERFACE:-}" ]; do done -if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then - INSTALL_LIBCAMERA="true" +if [[ -f "/usr/local/bin/libcamera-still" || -f "/usr/local/bin/rpicam-still" ]]; then + INSTALL_LIBCAMERA="false" + + echo + echo + echo "Detected a custom installation of libcamera in /usr/local" + echo + echo + sleep 3 fi @@ -1013,7 +1012,7 @@ elif [[ "$DISTRO_NAME" == "Raspbian" && "$DISTRO_RELEASE" == "10" ]]; then VIRTUALENV_REQ_POST=requirements/requirements_empty.txt - if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then + if [[ "$CAMERA_INTERFACE" =~ ^libcamera ]]; then echo echo echo "libcamera is not supported in this distribution" @@ -1167,7 +1166,7 @@ elif [[ "$DISTRO_NAME" == "Debian" && "$DISTRO_RELEASE" == "10" ]]; then VIRTUALENV_REQ_POST=requirements/requirements_empty.txt - if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then + if [[ "$CAMERA_INTERFACE" =~ ^libcamera ]]; then echo echo echo "libcamera is not supported in this distribution" @@ -1326,14 +1325,6 @@ elif [[ "$DISTRO_NAME" == "Ubuntu" && "$DISTRO_RELEASE" == "22.04" ]]; then fi - if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then - echo - echo - echo "libcamera is not supported in this distribution" - exit 1 - fi - - if [[ "$CPU_ARCH" == "x86_64" && "$CPU_BITS" == "64" ]]; then if [[ ! -f "${INDI_DRIVER_PATH}/indiserver" && ! -f "/usr/local/bin/indiserver" ]]; then sudo add-apt-repository -y ppa:mutlaqja/ppa @@ -1509,14 +1500,6 @@ elif [[ "$DISTRO_NAME" == "Ubuntu" && "$DISTRO_RELEASE" == "20.04" ]]; then fi - if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then - echo - echo - echo "libcamera is not supported in this distribution" - exit 1 - fi - - if [[ "$CPU_ARCH" == "x86_64" && "$CPU_BITS" == "64" ]]; then if [[ ! -f "${INDI_DRIVER_PATH}/indiserver" && ! -f "/usr/local/bin/indiserver" ]]; then sudo add-apt-repository -y ppa:mutlaqja/ppa @@ -1692,7 +1675,7 @@ elif [[ "$DISTRO_NAME" == "Ubuntu" && "$DISTRO_RELEASE" == "18.04" ]]; then - if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then + if [[ "$CAMERA_INTERFACE" =~ ^libcamera ]]; then echo echo echo "libcamera is not supported in this distribution" @@ -2614,88 +2597,6 @@ if [ "$IMAGE_FOLDER" != "${ALLSKY_DIRECTORY}/html/images" ]; then fi -if [ "$CCD_DRIVER" == "indi_rpicam" ]; then - echo "**** Enable Raspberry Pi camera interface ****" - sudo raspi-config nonint do_camera 0 - - echo "**** Ensure user is a member of the video group ****" - sudo usermod -a -G video "$USER" - - echo "**** Disable star eater algorithm ****" - sudo vcdbg set imx477_dpc 0 || true - - echo "**** Setup disable cronjob at /etc/cron.d/disable_star_eater ****" - echo "@reboot root /usr/bin/vcdbg set imx477_dpc 0 >/dev/null 2>&1" | sudo tee /etc/cron.d/disable_star_eater - sudo chown root:root /etc/cron.d/disable_star_eater - sudo chmod 644 /etc/cron.d/disable_star_eater - - echo - echo - echo "If this is the first time you have setup your Raspberry PI camera, please reboot when" - echo "this script completes to enable the camera interface..." - echo - echo - - sleep 5 -fi - - -if [[ "$CAMERA_INTERFACE" =~ "^libcamera" ]]; then - echo "**** Enable Raspberry Pi camera interface ****" - sudo raspi-config nonint do_camera 0 - - echo "**** Ensure user is a member of the video group ****" - sudo usermod -a -G video "$USER" - - echo "**** Disable star eater algorithm ****" - echo "options imx477 dpc_enable=0" | sudo tee /etc/modprobe.d/imx477_dpc.conf - sudo chown root:root /etc/modprobe.d/imx477_dpc.conf - sudo chmod 644 /etc/modprobe.d/imx477_dpc.conf - - - LIBCAMERA_CAMERAS=" - imx290 - imx378 - imx477 - imx477_noir - imx477_af - imx219 - imx219_noir - imx519 - imx708 - imx708_noir - imx708_wide - imx708_wide_noir - arducam_64mp - " - - for LIBCAMERA_JSON in $LIBCAMERA_CAMERAS; do - JSON_FILE="/usr/share/libcamera/ipa/raspberrypi/${LIBCAMERA_JSON}.json" - - if [ -f "$JSON_FILE" ]; then - echo "Disabling dpc in $JSON_FILE" - - TMP_JSON=$(mktemp) - jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE" > "$TMP_JSON" - sudo cp -f "$TMP_JSON" "$JSON_FILE" - sudo chown root:root "$JSON_FILE" - sudo chmod 644 "$JSON_FILE" - [[ -f "$TMP_JSON" ]] && rm -f "$TMP_JSON" - fi - done - - - echo - echo - echo "If this is the first time you have setup your Raspberry PI camera, please reboot when" - echo "this script completes to enable the camera interface..." - echo - echo - - sleep 5 -fi - - # Disable raw frames with libcamera when running less than 1GB of memory if [ "$MEM_TOTAL" -lt "768000" ]; then TMP_LIBCAM_TYPE=$(mktemp --suffix=.json) From 635d3e6dfb573fb09db03867ba556f7742c6b368 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Mon, 12 Feb 2024 15:29:57 -0600 Subject: [PATCH 3/5] disable DPC --- misc/libcamera_disable_dpc.sh | 118 ++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100755 misc/libcamera_disable_dpc.sh diff --git a/misc/libcamera_disable_dpc.sh b/misc/libcamera_disable_dpc.sh new file mode 100755 index 00000000..e9c54a85 --- /dev/null +++ b/misc/libcamera_disable_dpc.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +#set -x # command tracing +set -o errexit +set -o nounset + + +PATH=/bin:/usr/bin +export PATH + + +DPC_STRENGTH="0" + +### libcamera Defective Pixel Correction (DPC) Strength +# https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf +# +# 0 = Off +# 1 = Normal correction (default) +# 2 = Strong correction +### + + +LIBCAMERA_PREFIX="/usr" + + +echo +echo "#########################################################" +echo "### Welcome to the indi-allsky script to disable ###" +echo "### Defective Pixel Correction (DPC) ###" +echo "#########################################################" +echo +echo +echo + + +if [[ -f "/usr/local/bin/libcamera-still" || -f "/usr/local/bin/rpicam-still" ]]; then + LIBCAMERA_PREFIX="/usr/local" + + echo "Detected a custom installation of libcamera in /usr/local" + echo + echo + sleep 3 +fi + + +if [[ "$(id -u)" == "0" ]]; then + echo + echo "Please do not run $(basename "$0") as root" + echo "Re-run this script as the user which will execute the indi-allsky software" + echo + echo + exit 1 +fi + + +echo "Setup proceeding in 10 seconds... (control-c to cancel)" +echo +sleep 10 + + +# Run sudo to ask for initial password +sudo true + + +LIBCAMERA_CAMERAS=" + imx290 + imx378 + imx477 + imx477_noir + imx477_af + imx219 + imx219_noir + imx519 + imx708 + imx708_noir + imx708_wide + imx708_wide_noir + arducam_64mp +" + +for LIBCAMERA_JSON in $LIBCAMERA_CAMERAS; do + ### PI4 and older + JSON_FILE_VC4="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/vc4/${LIBCAMERA_JSON}.json" + + ### PI5 + JSON_FILE_PISP="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/pisp/${LIBCAMERA_JSON}.json" + + + if [ -f "$JSON_FILE_VC4" ]; then + echo "Disabling dpc in $JSON_FILE_VC4" + + TMP_DPC_JSON_VC4=$(mktemp --suffix=.json) + jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_VC4" > "$TMP_DPC_JSON_VC4" + sudo cp -f "$TMP_DPC_JSON_VC4" "$JSON_FILE_VC4" + sudo chown root:root "$JSON_FILE_VC4" + sudo chmod 644 "$JSON_FILE_VC4" + [[ -f "$TMP_DPC_JSON_VC4" ]] && rm -f "$TMP_DPC_JSON_VC4" + else + echo "File not found: $JSON_FILE_VC4" + fi + + + if [ -f "$JSON_FILE_PISP" ]; then + echo "Disabling dpc in $JSON_FILE_PISP" + + TMP_DPC_JSON_PISP=$(mktemp --suffix=.json) + jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_PISP" > "$TMP_DPC_JSON_PISP" + sudo cp -f "$TMP_DPC_JSON_PISP" "$JSON_FILE_PISP" + sudo chown root:root "$JSON_FILE_PISP" + sudo chmod 644 "$JSON_FILE_PISP" + [[ -f "$TMP_DPC_JSON_PISP" ]] && rm -f "$TMP_DPC_JSON_PISP" + else + echo "File not found: $JSON_FILE_PISP" + fi + + +done + From e1449903421b57d115bfc7e1d8d1f077b6ac2e1c Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Mon, 12 Feb 2024 15:30:08 -0600 Subject: [PATCH 4/5] disable DPC --- misc/libcamera_enable_dpc.sh | 118 ----------------------------------- 1 file changed, 118 deletions(-) delete mode 100755 misc/libcamera_enable_dpc.sh diff --git a/misc/libcamera_enable_dpc.sh b/misc/libcamera_enable_dpc.sh deleted file mode 100755 index 6b18610f..00000000 --- a/misc/libcamera_enable_dpc.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash - -#set -x # command tracing -set -o errexit -set -o nounset - - -PATH=/bin:/usr/bin -export PATH - - -DPC_STRENGTH="1" - -### libcamera Defective Pixel Correction (DPC) Strength -# https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf -# -# 0 = Off -# 1 = Normal correction (default) -# 2 = Strong correction -### - - -LIBCAMERA_PREFIX="/usr" - - -echo -echo "#########################################################" -echo "### Welcome to the indi-allsky script to restore ###" -echo "### Defective Pixel Correction (DPC) ###" -echo "#########################################################" -echo -echo -echo - - -if [[ -f "/usr/local/bin/libcamera-still" || -f "/usr/local/bin/rpicam-still" ]]; then - LIBCAMERA_PREFIX="/usr/local" - - echo "Detected a custom installation of libcamera in /usr/local" - echo - echo - sleep 3 -fi - - -if [[ "$(id -u)" == "0" ]]; then - echo - echo "Please do not run $(basename "$0") as root" - echo "Re-run this script as the user which will execute the indi-allsky software" - echo - echo - exit 1 -fi - - -echo "Setup proceeding in 10 seconds... (control-c to cancel)" -echo -sleep 10 - - -# Run sudo to ask for initial password -sudo true - - -LIBCAMERA_CAMERAS=" - imx290 - imx378 - imx477 - imx477_noir - imx477_af - imx219 - imx219_noir - imx519 - imx708 - imx708_noir - imx708_wide - imx708_wide_noir - arducam_64mp -" - -for LIBCAMERA_JSON in $LIBCAMERA_CAMERAS; do - ### PI4 and older - JSON_FILE_VC4="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/vc4/${LIBCAMERA_JSON}.json" - - ### PI5 - JSON_FILE_PISP="${LIBCAMERA_PREFIX}/share/libcamera/ipa/rpi/pisp/${LIBCAMERA_JSON}.json" - - - if [ -f "$JSON_FILE_VC4" ]; then - echo "Disabling dpc in $JSON_FILE_VC4" - - TMP_DPC_JSON_VC4=$(mktemp --suffix=.json) - jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_VC4" > "$TMP_DPC_JSON_VC4" - sudo cp -f "$TMP_DPC_JSON_VC4" "$JSON_FILE_VC4" - sudo chown root:root "$JSON_FILE_VC4" - sudo chmod 644 "$JSON_FILE_VC4" - [[ -f "$TMP_DPC_JSON_VC4" ]] && rm -f "$TMP_DPC_JSON_VC4" - else - echo "File not found: $JSON_FILE_VC4" - fi - - - if [ -f "$JSON_FILE_PISP" ]; then - echo "Disabling dpc in $JSON_FILE_PISP" - - TMP_DPC_JSON_PISP=$(mktemp --suffix=.json) - jq --argjson rpidpc_strength "$DPC_STRENGTH" '."rpi.dpc".strength = $rpidpc_strength' "$JSON_FILE_PISP" > "$TMP_DPC_JSON_PISP" - sudo cp -f "$TMP_DPC_JSON_PISP" "$JSON_FILE_PISP" - sudo chown root:root "$JSON_FILE_PISP" - sudo chmod 644 "$JSON_FILE_PISP" - [[ -f "$TMP_DPC_JSON_PISP" ]] && rm -f "$TMP_DPC_JSON_PISP" - else - echo "File not found: $JSON_FILE_PISP" - fi - - -done - From 296305b4e9de990c2323c38bd850190ccb230cef Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 14 Feb 2024 10:38:18 -0600 Subject: [PATCH 5/5] indiclient shutdown causing problems with temp calibrated darks --- indi_allsky/darks.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/indi_allsky/darks.py b/indi_allsky/darks.py index 2db55502..d537f8ee 100644 --- a/indi_allsky/darks.py +++ b/indi_allsky/darks.py @@ -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() @@ -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 @@ -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() @@ -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 @@ -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)