APT Plan Generator manual

APT Plan generator was born from a frustration: how to visit several targets during the night without sitting in front of the computer. I like to visit supernovae, but each doesn't need much time: about 30 minutes for each separate target. So over a summer night, I could visit 9 or 10 supernovae. In the winter much more. APT has the ability to create plans, but it's a very time consuming activity if your plan changes every night: stop guiding, move to a target, plate solve and check, start guiding, take photos, and so on. Creating a plan for 10 targets could take a very long time and would be prone to errors. So I looked into a way to automate that. This is how APT Plan Generator (APTPG) was born.

Using APTPG is simple: when it starts, choose from the "Data" menu whether you want to visit supernovae or DSO targets. APTPG was created with supernovae in mind, but works (albeit a bit slowly) with DSO targets too (a catalog is provided).


The screen has the following sections:
- At the top, the parameters of your plan: the plan name (which you'll see in APT's list of plans), the path to APT's log file (look for APT.xml on your disk), whether you use a digital camera or a CCD camera (as defined by APT), the start time of your plan(3) (important so that APTPG can create a schedule), the latitude/longitude of the observer, your hemisphere, the length of pauses in the plan for times when nothing needs to be done (600, i.e. 10 minutes, is usually good), the minimum altitude the targets need to be at to be considered for the plan (most people would use 30 degrees or so), the maximum magnitude you want the targets to be (this depends in part on the capabilities of your hardware and the time you want to spend on each target), the length of each exposure (individual image), and the number of exposures per target.
- A list of the targets in the catalog that match the search criteria.
- A graph showing the altitude of the selected targets over time during the night (i.e. between sunset and sunrise).
- Combo boxes to chose the sorting of the table, and 3 action buttons: "Reset", which unselects the targets in the table; "Reload", which reloads the data into the table, i.e. after changing some of the parameters of the plan; "Generate" that schedules the targets and inserts them into APT's plans.

Once you have selected the targets you're interested in, click "Generate". This will run a genetic algorithm (GA) that will try to schedule your targets between the start time you provided and the end of the night(1). If the GA finds a suitable schedule, it will be shown to you with the name of the targets and P (for pause when nothing needs to be done). If you confirm you want to use that plan, click "OK" and the plan will be added to APT's light plans(2). If you click "Cancel" the schedule is abandonned and APT isn't modified.


Now start APT (don't run APTPG while APT is running as APT will wipe the new plan when it exits if it didn't exist when it was started). In your light plans, you should see your schedule. Select it and start it at the time you specified in APTPG as start time.

The plan relies on the following features in APT:
- Guiding control (PhD).
- Plate solving (whichever way is defined).

Note that APTPG doesn't get realtime feedback from APT. That means that if you encounter problems with say, your guiding, your plan could get out of sync with the schedule and therefore no longer match what is possible (e.g. the targets might no longer be visible when you reach that stage in the plan). There is unfortunately nothing APTPG can do about that. The only way to mitigate the issue is not to fill the plan too tightly.

Keep in mind that APTPG is a Beta version and will contain issues. Please report them so that they can be fixed quickly. Feel free to also send suggestions.



(1) The end of the night is defined by default as 1 hour before sunrise. This is a personal preference and is partially season dependent. You can change that value in the file "SupernovaPlanGenerator.exe.config", option Dawn (in seconds).

(2) If you use a digital camera, you can set the ISO and quality in the file "SupernovaPlanGenerator.exe.config" with options "ISO" and "Quality".

(3) All times are considered local time.

13 comments:

  1. Hi Cedric, Thank you for APTPG, I have teh following difficulties : after launching I choose SN as requested and after a while I received teh following message : L aformat de la chaine d'entrée est incorrect à system.number.parseDouble[string value, numberstylesoptins, numberformatinfo numfmt)...etc..
    and teh another window sayinf :"une exception non gérée s'est produite dan svotre application .si vous clisuez sur continue, l'applicaion va ignorer cette erreur et esayer de continuer si vous cliquez su rquitter, l'appliaction va s'arreter imédiatement". la refrence d'objet n'set pas définie à un einstance d'un objet."
    Thank you for helping me with this promising SW.
    best regards (and sunlight from Bordeaux;-))

    ReplyDelete
  2. Hi Laurent,
    It could be a number of things. David Bishop's page changed not long ago, it scould be that. I've made version 0.0.27.1 to make sure it can read that page. Could you try the new version please?
    It could also be a problem with the locale. That caused me problems in the past because all my computers are setup for en-gb. If you still have the error, could you copy the whole e4xception please?
    Thanks.
    PS: the weather in Bordeaux hasn't been great in the last few weeks unfortunately. I live 2 hours' drive away.

    ReplyDelete
    Replies
    1. Hi Cedric, I tried the 27.1, the problem remains.strangely when I install 27.1 version I have a window that stipulate that a new version is available, and the "about" saysthat the version is 27.0. I tried twice.
      The
      framework details are the following:
      Consultez la fin de ce message pour plus de détails sur l'appel du débogage
      juste-à-temps (JIT) à la place de cette boîte de dialogue.

      ************** Texte de l'exception **************
      System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
      à SupernovaPlanGenerator.Form1.AdjustColumns()
      à SupernovaPlanGenerator.Form1.loadSNDataToolStripMenuItem_Click(Object sender, EventArgs e)
      à System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
      à System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
      à System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
      à System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
      à System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
      à System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
      à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      à System.Windows.Forms.Control.WndProc(Message& m)
      à System.Windows.Forms.ToolStrip.WndProc(Message& m)
      à System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
      à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


      ************** Assemblys chargés **************
      mscorlib
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4018.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
      ----------------------------------------
      APTPlanGenerator
      Version de l'assembly : 0.0.27.0
      Version Win32 : 0.0.27
      CodeBase : file:///C:/Program%20Files%20(x86)/APT%20Plan%20Generator/APTPlanGenerator.exe
      ----------------------------------------
      System.Windows.Forms
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4001.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
      ----------------------------------------
      System
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4001.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
      ----------------------------------------

      Delete
    2. second part of the message (limited to 4096 characters)

      System.Drawing
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
      ----------------------------------------
      System.Configuration
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
      ----------------------------------------
      System.Core
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4018.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
      ----------------------------------------
      System.Xml
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
      ----------------------------------------
      System.Windows.Forms.DataVisualization
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3815.0
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
      ----------------------------------------
      System.Windows.Forms.resources
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll
      ----------------------------------------
      System.Windows.Forms.DataVisualization.resources
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization.resources/v4.0_4.0.0.0_fr_31bf3856ad364e35/System.Windows.Forms.DataVisualization.resources.dll
      ----------------------------------------
      Accessibility
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
      ----------------------------------------

      Delete
    3. end of message

      System.Net.Http
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
      ----------------------------------------
      System.Data
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
      ----------------------------------------
      mscorlib.resources
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/mscorlib.resources.dll
      ----------------------------------------
      Newtonsoft.Json
      Version de l'assembly : 6.0.0.0
      Version Win32 : 6.0.8.18111
      CodeBase : file:///C:/Program%20Files%20(x86)/APT%20Plan%20Generator/Newtonsoft.Json.DLL
      ----------------------------------------
      System.Numerics
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
      ----------------------------------------
      System.Runtime.Serialization
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3825.0 built by: NET48REL1LAST_B
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
      ----------------------------------------
      System.Xml.Linq
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
      ----------------------------------------

      ************** Débogage JIT **************
      Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cette
      application ou cet ordinateur (machine.config) doit avoir la valeur
      jitDebugging définie dans la section system.windows.forms.
      L'application doit également être compilée avec le débogage
      activé.

      Par exemple :





      Lorsque le débogage juste-à-temps est activé, les exceptions non gérées
      seront envoyées au débogueur JIT inscrit sur l'ordinateur
      plutôt que d'être gérées par cette boîte de dialogue.


      I hope this helps,
      Thanks

      Delete
    4. Hi Laurent,

      Try to uninstall the program and reinstall it. 0.0.27.1 shouldn't tell you there's a new version and it should show the right version in the about menu.

      What did you do when you got the message? Was it a resorting? A reload of SN data from the menu? I can't reproduce it at the moment.

      Thanks.

      Delete
    5. Hi Cedric,
      As recommanded I :
      uninstall the old one.
      download 0.0.27.1
      install the 0.0.27.1
      first surprise : windows "program and functionnality" list show me the installed version : 0.0.27.0
      then I launched APTPG
      I receive a message telling me a new version is available.
      (kind question :are you sure the download link is pointing to the good version?).
      then : Data>load SN data
      the lower middle part of the window telle me "loading data..."
      then displays "generating list data"
      and I have a error window (I can't copy/paste) but its start with "Le format de la chaine d'entre est incorrect.
      à System.Number.ParseDouble(String value, NumberStylesoptions, NumberFormaInfo numfmt)
      à SupernovaPlanGenerator.Model.SkyObject.RaToD(Stringvalue)
      à [NDLR etc...]
      sole option to click : OK
      Then a second window appears named Microsoft.NET Framework
      3Une exception non gérée s'est produite dans votre application. SI vous [NDLR I copied the detail yesterday above ]
      clicking options are continue or quit.
      >continue
      the window remains at Generating list data for a while
      (check Help>about> version is still 0.0.27.0)
      At this level I don't know if the program is frozen or still generating the list, a progress bargraph may be helpfull.
      After 2 hours running I decided to close . and restart
      Data> load SN data
      but same results.
      Thanks

      Delete
    6. Hi Laurent.
      You're right, the link was wrong. Try to download again and see if the type issue goes away (I expect not).
      Thanks.

      Delete
    7. Hi Cedric,
      The version is good now butI have still exeptions:

      Consultez la fin de ce message pour plus de détails sur l'appel du débogage
      juste-à-temps (JIT) à la place de cette boîte de dialogue.

      ************** Texte de l'exception **************
      System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
      à SupernovaPlanGenerator.Form1.AdjustColumns()
      à SupernovaPlanGenerator.Form1.loadSNDataToolStripMenuItem_Click(Object sender, EventArgs e)
      à System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
      à System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
      à System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
      à System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
      à System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
      à System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
      à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      à System.Windows.Forms.Control.WndProc(Message& m)
      à System.Windows.Forms.ToolStrip.WndProc(Message& m)
      à System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
      à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


      ************** Assemblys chargés **************
      mscorlib
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4018.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
      ----------------------------------------
      APTPlanGenerator
      Version de l'assembly : 0.0.27.1
      Version Win32 : 0.0.27.1
      CodeBase : file:///C:/Program%20Files%20(x86)/APT%20Plan%20Generator/APTPlanGenerator.exe
      ----------------------------------------
      System.Windows.Forms
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4001.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
      ----------------------------------------
      System
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4001.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
      ----------------------------------------
      System.Drawing
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
      ----------------------------------------
      System.Configuration
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.3752.0 built by: NET48REL1
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
      ----------------------------------------
      System.Core
      Version de l'assembly : 4.0.0.0
      Version Win32 : 4.8.4018.0 built by: NET48REL1LAST_C
      CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
      ----------------------------------------
      System.Xml
      Version de l'assembly : 4.0.0.0
      -----------------------------

      etc...
      best regards,

      Delete
  3. Hi Laurent. Not yet. I'm trying to figure out what could cause the error. I'll make a debit version for you tomorrow so we can get more information about the error.

    ReplyDelete
  4. Hi Laurent. I created a new version for you that will log errors. Download it from http://download.aptplangenerator.com/0.0.27.2/APTPGsetup.exe.
    It will display a version warning at the start. The log file containing the error will be in your Windows temp directory (usually c:\windows\temp) and is called APTPG.log. That will hopefully tell us where the error is.
    BTW, here is my email address, it will be easier to discuss the issue: cedric at aptplangenerator.com
    Thanks.

    ReplyDelete
    Replies
    1. Hi Cedric,
      I sent you the log file.
      rgds,
      Laurent

      Delete