Commit e83a5837 authored by Jasem Mutlaq's avatar Jasem Mutlaq

+ Adding options to select binning in the focus and alignment modules.

+ Cleaned up focus module UI.
+ Added activity LED to FITS Viewer
parent 46e9c388
......@@ -61,6 +61,9 @@ Align::Align()
connect(correctAltB, SIGNAL(clicked()), this, SLOT(correctAltError()));
connect(correctAzB, SIGNAL(clicked()), this, SLOT(correctAzError()));
kcfg_solverXBin->setValue(Options::solverXBin());
kcfg_solverYBin->setValue(Options::solverYBin());
syncBoxesB->setIcon(KIcon("edit-copy"));
clearBoxesB->setIcon(KIcon("edit-clear"));
......@@ -475,7 +478,7 @@ bool Align::capture()
connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
targetChip->setCaptureMode(FITS_WCSM);
targetChip->setBinning(kcfg_solverXBin->value(), kcfg_solverYBin->value());
targetChip->setFrameType(ccdFrame);
targetChip->capture(seqExpose);
......@@ -511,6 +514,9 @@ void Align::startSovling(const QString &filename)
fitsFile = filename;
Options::setSolverXBin(kcfg_solverXBin->value());
Options::setSolverYBin(kcfg_solverYBin->value());
currentTelescope->getEqCoords(&ra, &dec);
targetCoord.setRA(ra);
......
......@@ -6,13 +6,13 @@
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<width>757</width>
<height>513</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
......@@ -133,206 +133,231 @@
<property name="title">
<string>Plate Solve Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="textLabel1_6">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>CCD:</string>
</property>
</widget>
</item>
<item>
<widget class="KComboBox" name="CCDCaptureCombo"/>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Exposure:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="exposureSpin">
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>60.000000000000000</double>
</property>
<property name="singleStep">
<double>0.500000000000000</double>
</property>
<property name="value">
<double>3.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_18">
<property name="text">
<string>Bin X:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_solverXBin">
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="text">
<string>Bin Y:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_solverYBin">
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="textLabel1_6">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>CCD:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_15">
<property name="toolTip">
<string>estimated RA of target center to limit the solver's search area</string>
</property>
<property name="text">
<string>RA:</string>
</property>
</widget>
</item>
</layout>
<widget class="QLabel" name="label_15">
<property name="toolTip">
<string>estimated RA of target center to limit the solver's search area</string>
</property>
<property name="text">
<string>RA:</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="KComboBox" name="CCDCaptureCombo"/>
</item>
<item>
<widget class="dmsBox" name="raBox">
<property name="toolTip">
<string/>
</property>
</widget>
</item>
</layout>
<widget class="dmsBox" name="raBox">
<property name="toolTip">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Exposure:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_16">
<property name="toolTip">
<string>estimated DEC of target center to limit the solver's search area</string>
</property>
<property name="text">
<string>Dec:</string>
</property>
</widget>
</item>
</layout>
<widget class="QLabel" name="label_16">
<property name="toolTip">
<string>estimated DEC of target center to limit the solver's search area</string>
</property>
<property name="text">
<string>Dec:</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QDoubleSpinBox" name="exposureSpin">
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>60.000000000000000</double>
</property>
<property name="singleStep">
<double>0.500000000000000</double>
</property>
<property name="value">
<double>3.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="dmsBox" name="decBox">
<property name="toolTip">
<string/>
</property>
</widget>
</item>
</layout>
<widget class="dmsBox" name="decBox">
<property name="toolTip">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>secs</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>Radius:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="radiusBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The solver's search radius in degrees round the estimated RA and DEC</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>30</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="syncBoxesB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fill RA &amp;amp; DEC values from telescope coordinates and update options&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearBoxesB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>Clear RA &amp; DEC values and reset solver options</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
<widget class="QLabel" name="label_17">
<property name="text">
<string>Radius:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="radiusBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The solver's search radius in degrees round the estimated RA and DEC</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>30</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="syncBoxesB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fill RA &amp;amp; DEC values from telescope coordinates and update options&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearBoxesB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>Clear RA &amp; DEC values and reset solver options</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
......@@ -369,6 +394,10 @@
</item>
</layout>
<zorder>verticalSpacer_7</zorder>
<zorder>label_18</zorder>
<zorder>label_19</zorder>
<zorder>kcfg_solverXBin</zorder>
<zorder>kcfg_solverYBin</zorder>
</widget>
</item>
</layout>
......
......@@ -78,6 +78,8 @@ Focus::Focus()
stepIN->setValue(Options::focusTicks());
kcfg_autoSelectStar->setChecked(Options::autoSelectStar());
kcfg_focusBoxSize->setValue(Options::focusBoxSize());
kcfg_focusXBin->setValue(Options::focusXBin());
kcfg_focusYBin->setValue(Options::focusYBin());
}
......@@ -182,6 +184,8 @@ void Focus::startFocus()
Options::setFocusTicks(stepIN->value());
Options::setFocusTolerance(toleranceIN->value());
Options::setFocusExposure(exposureIN->value());
Options::setFocusXBin(kcfg_focusXBin->value());
Options::setFocusYBin(kcfg_focusYBin->value());
Options::setAutoSelectStar(kcfg_autoSelectStar->isChecked());
......@@ -234,6 +238,7 @@ void Focus::capture()
return;
}
targetChip->setBinning(kcfg_focusXBin->value(), kcfg_focusXBin->value());
targetChip->setCaptureMode(FITS_FOCUS);
targetChip->setCaptureFilter( (FITSScale) filterCombo->currentIndex());
......@@ -322,6 +327,13 @@ void Focus::newFITS(IBLOB *bp)
ISD::CCDChip *targetChip = currentCCD->getChip(ISD::CCDChip::PRIMARY_CCD);
FITSView *targetImage = targetChip->getImage(FITS_FOCUS);
if (targetImage == NULL)
{
appendLogText(i18n("FITS image failed to load, aborting..."));
stopFocus();
return;
}
FITSImage *image_data = targetImage->getImageData();
currentCCD->disconnect(this);
......@@ -362,6 +374,7 @@ void Focus::newFITS(IBLOB *bp)
if (maxStar == NULL)
{
appendLogText(i18n("Failed to automatically select a star. Please select a star manually."));
stopFocus();
return;
}
......
......@@ -6,87 +6,182 @@
<rect>
<x>0</x>
<y>0</y>
<width>861</width>
<height>512</height>
<width>681</width>
<height>542</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Focus Mode</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>CCD</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="textLabel1_6">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="textLabel1_6">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>CCD:</string>
</property>
</widget>
</item>
<item>
<widget class="KComboBox" name="CCDCaptureCombo"/>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_18">
<property name="text">
<string>Bin X:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_focusXBin">
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="text">
<string>Bin Y:</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_focusYBin">