Bug 413216 - Mosaic tool copies FITS file to job specs, leading to incorrect alignment of mosaic captures
Summary: Mosaic tool copies FITS file to job specs, leading to incorrect alignment of ...
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: 3.3.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-19 23:46 UTC by James Harrison
Modified: 2019-10-20 13:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 3.3.7


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Harrison 2019-10-19 23:46:09 UTC
SUMMARY

FITS file setting is propagated to mosaic jobs

STEPS TO REPRODUCE
1. Open the Ekos scheduler. Enter target, search, and select a FITS file for the target
2. Create a new job
3. Use the Mosaic tool to generate a bunch of jobs
4. Run the jobs

OBSERVED RESULT
Plate solving uses the FITS file rather than the coordinates for each mosaic element, meaning that the mosaic produced does not in fact go to the specified coordinates for each job.

EXPECTED RESULT
FITS file w/ WCS or plate solved should be used as input for the centre of the mosaic for the mosaic tool *or* ignored, rather than written to the job spec for each job.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch, latest
(available in About System)
KDE Plasma Version: N/A
KDE Frameworks Version: N/A
Qt Version: N/A

ADDITIONAL INFORMATION
<?xml version="1.0" encoding="UTF-8" ?>
<SchedulerList version="1.4">
    <Profile>Default</Profile>
    <Job>
        <Name>heartnebula-Part9</Name>
        <Priority>10</Priority>
        <Coordinates>
            <J2000RA>2.50593</J2000RA>
            <J2000DE>62.0176</J2000DE>
        </Coordinates>
        <FITS>/home/james/Pictures/scope/2019-10-19/Light/H_Alpha/HeartNebula_Light_H_Alpha_300_secs_2019-10-19T21-36-44_010.fits</FITS>
        <Sequence>/home/james/Pictures/scope/2019-10-19/Mosaic/heartnebula-Part9.esq</Sequence>
        <StartupCondition>
            <Condition>ASAP</Condition>
        </StartupCondition>
        <Constraints>
            <Constraint value="0">MinimumAltitude</Constraint>
            <Constraint>EnforceTwilight</Constraint>
        </Constraints>
        <CompletionCondition>
            <Condition>Sequence</Condition>
        </CompletionCondition>
        <Steps>
            <Step>Track</Step>
            <Step>Focus</Step>
            <Step>Align</Step>
            <Step>Guide</Step>
        </Steps>
    </Job>
... n jobs
    <Job>
        <Name>heartnebula-Part1</Name>
        <Priority>10</Priority>
        <Coordinates>
            <J2000RA>2.58407</J2000RA>
            <J2000DE>60.8758</J2000DE>
        </Coordinates>
        <FITS>/home/james/Pictures/scope/2019-10-19/Light/H_Alpha/HeartNebula_Light_H_Alpha_300_secs_2019-10-19T21-36-44_010.fits</FITS>
        <Sequence>/home/james/Pictures/scope/2019-10-19/Mosaic/heartnebula-Part1.esq</Sequence>
        <StartupCondition>
            <Condition>ASAP</Condition>
        </StartupCondition>
        <Constraints>
            <Constraint value="0">MinimumAltitude</Constraint>
            <Constraint>EnforceTwilight</Constraint>
        </Constraints>
        <CompletionCondition>
            <Condition>Sequence</Condition>
        </CompletionCondition>
        <Steps>
            <Step>Track</Step>
            <Step>Focus</Step>
            <Step>Align</Step>
            <Step>Guide</Step>
        </Steps>
    </Job>
    <ErrorHandlingStrategy value="1">
        <delay>0</delay>
    </ErrorHandlingStrategy>
    <StartupProcedure></StartupProcedure>
    <ShutdownProcedure></ShutdownProcedure>
</SchedulerList>
Comment 1 Jasem Mutlaq 2019-10-20 05:00:07 UTC
So the coordinates are used for the initial slew to the target. If a FITS file was specified, then the plate solver would perform the following:

1. Solve the FITS file.
2. Slew the mount to the solution coordinates (center of FITS file).
3. Captures and image to ensure we are at the coords in #2.

Does this clears it up for you?
Comment 2 James Harrison 2019-10-20 11:16:43 UTC
(In reply to Jasem Mutlaq from comment #1)
> So the coordinates are used for the initial slew to the target. If a FITS
> file was specified, then the plate solver would perform the following:
> 
> 1. Solve the FITS file.
> 2. Slew the mount to the solution coordinates (center of FITS file).
> 3. Captures and image to ensure we are at the coords in #2.
> 
> Does this clears it up for you?

That absolutely is the behaviour I am seeing and is expected.

However, the mosaic tool should *never* set the FITS attribute in any of the jobs it creates, even if set in the origin job, because the whole purpose of that tool is to calculate the coordinates for each job, and those will *always* differ from the FITS file. 

Thus leading to the unexpected behaviour of the mosaic tool jobs all imaging the same location, not the mosaic targets.
Comment 3 Jasem Mutlaq 2019-10-20 12:35:43 UTC
Oh you're absolutely right, it needs to strip this property from the job or warn the user at least about it.
Comment 4 Jasem Mutlaq 2019-10-20 13:07:27 UTC
Git commit dc3b30b5fb67dfa50353f028af907b099bde8b65 by Jasem Mutlaq.
Committed on 20/10/2019 at 13:06.
Pushed by mutlaqja into branch 'master'.

Do not save FITS file in mosaic job scheduler list since each job has its own unique calculated location.
FIXED-IN:3.3.7

M  +6    -0    kstars/ekos/scheduler/scheduler.cpp

https://commits.kde.org/kstars/dc3b30b5fb67dfa50353f028af907b099bde8b65