Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/align/align.cpp
Show First 20 Lines • Show All 2476 Lines • ▼ Show 20 Line(s) | 2455 | { | |||
---|---|---|---|---|---|
2477 | 2477 | | |||
2478 | if(Options::useSextractor()) | 2478 | if(Options::useSextractor()) | ||
2479 | { | 2479 | { | ||
2480 | //Sextractor needs all these parameters in order to solve an xylist of stars | 2480 | //Sextractor needs all these parameters in order to solve an xylist of stars | ||
2481 | if (optionsMap.contains("image_width")) | 2481 | if (optionsMap.contains("image_width")) | ||
2482 | solver_args << "--width" << QString::number(optionsMap.value("image_width").toInt()); | 2482 | solver_args << "--width" << QString::number(optionsMap.value("image_width").toInt()); | ||
2483 | if (optionsMap.contains("image_height")) | 2483 | if (optionsMap.contains("image_height")) | ||
2484 | solver_args << "--height" << QString::number(optionsMap.value("image_height").toInt()); | 2484 | solver_args << "--height" << QString::number(optionsMap.value("image_height").toInt()); | ||
2485 | solver_args << "--x-column X_IMAGE --y-column Y_IMAGE --sort-column MAG_AUTO --sort-ascending"; | 2485 | solver_args << "--x-column" << "X_IMAGE"; | ||
2486 | solver_args << "--y-column" << "Y_IMAGE"; | ||||
2487 | solver_args << "--sort-column" << "MAG_AUTO"; | ||||
2488 | solver_args << "--sort-ascending"; | ||||
2486 | 2489 | | |||
2487 | //Note This set of items is NOT NEEDED for Sextractor, it is needed to avoid python usage | 2490 | //Note This set of items is NOT NEEDED for Sextractor, it is needed to avoid python usage | ||
2488 | //This may need to be changed later, but since the goal for using sextractor is to avoid python, this is placed here. | 2491 | //This may need to be changed later, but since the goal for using sextractor is to avoid python, this is placed here. | ||
2489 | solver_args << "--no-remove-lines --uniformize 0"; | 2492 | solver_args << "--no-remove-lines"; | ||
2493 | solver_args << "--uniformize" << "0"; | ||||
2490 | } | 2494 | } | ||
2491 | 2495 | | |||
2492 | // image scale low | 2496 | // image scale low | ||
2493 | if (optionsMap.contains("scaleL")) | 2497 | if (optionsMap.contains("scaleL")) | ||
2494 | solver_args << "-L" << QString::number(optionsMap.value("scaleL").toDouble()); | 2498 | solver_args << "-L" << QString::number(optionsMap.value("scaleL").toDouble()); | ||
2495 | 2499 | | |||
2496 | // image scale high | 2500 | // image scale high | ||
2497 | if (optionsMap.contains("scaleH")) | 2501 | if (optionsMap.contains("scaleH")) | ||
▲ Show 20 Lines • Show All 2118 Lines • ▼ Show 20 Line(s) | 4618 | #endif | |||
4616 | if (fileURL.isEmpty()) | 4620 | if (fileURL.isEmpty()) | ||
4617 | fileURL = QFileDialog::getOpenFileName(KStars::Instance(), i18n("Load Image"), dirPath, | 4621 | fileURL = QFileDialog::getOpenFileName(KStars::Instance(), i18n("Load Image"), dirPath, | ||
4618 | "Images (*.fits *.fit *.jpg *.jpeg)"); | 4622 | "Images (*.fits *.fit *.jpg *.jpeg)"); | ||
4619 | 4623 | | |||
4620 | if (fileURL.isEmpty()) | 4624 | if (fileURL.isEmpty()) | ||
4621 | return false; | 4625 | return false; | ||
4622 | 4626 | | |||
4623 | QFileInfo fileInfo(fileURL); | 4627 | QFileInfo fileInfo(fileURL); | ||
4628 | QString newFileURL=QDir::tempPath() + "/" + fileInfo.fileName().remove(" "); | ||||
4629 | QFile::copy(fileURL, newFileURL); | ||||
4630 | QFileInfo newFileInfo(newFileURL); | ||||
4631 | | ||||
4632 | | ||||
4624 | dirPath = fileInfo.absolutePath(); | 4633 | dirPath = fileInfo.absolutePath(); | ||
4625 | 4634 | | |||
4626 | differentialSlewingActivated = false; | 4635 | differentialSlewingActivated = false; | ||
4627 | 4636 | | |||
4628 | loadSlewState = IPS_BUSY; | 4637 | loadSlewState = IPS_BUSY; | ||
4629 | 4638 | | |||
4630 | stopPAHProcess(); | 4639 | stopPAHProcess(); | ||
4631 | 4640 | | |||
4632 | slewR->setChecked(true); | 4641 | slewR->setChecked(true); | ||
4633 | currentGotoMode = GOTO_SLEW; | 4642 | currentGotoMode = GOTO_SLEW; | ||
4634 | 4643 | | |||
4635 | solveB->setEnabled(false); | 4644 | solveB->setEnabled(false); | ||
4636 | stopB->setEnabled(true); | 4645 | stopB->setEnabled(true); | ||
4637 | pi->startAnimation(); | 4646 | pi->startAnimation(); | ||
4638 | 4647 | | |||
4639 | startSolving(fileURL, false); | 4648 | startSolving(newFileURL, false); | ||
4640 | 4649 | | |||
4641 | return true; | 4650 | return true; | ||
4642 | } | 4651 | } | ||
4643 | 4652 | | |||
4644 | void Align::setExposure(double value) | 4653 | void Align::setExposure(double value) | ||
4645 | { | 4654 | { | ||
4646 | exposureIN->setValue(value); | 4655 | exposureIN->setValue(value); | ||
4647 | } | 4656 | } | ||
▲ Show 20 Lines • Show All 1551 Lines • Show Last 20 Lines |