• FocusCraft


The FocusCraft is accessible from Tools tab
or with F6 key
Related videos:
FocusCraft is the heart of the automatic refocusing as it purpose is to measure how good the focus is.
FocusCraft can work in three modes. The first is to detect all the stars in the frame and calculated the averaged HFD (Half Flux Diameter) and FWHM (Full Width Half Maximum). The seconds calls ASTAP to calculate the HFD. The third is analyzing the whole image without detecting the stars and to calculate the InvPower (Fourier method).
Please note that star detection and the HFD / FWHM needs time and this can make the APT operation slower than you have used to!
Cheng-Yang Tan and Benjamin Schulz have invented and implemented new focusing method named Fm after Fourier method and the metrics that it produces is named InvPower. It analyzes the whole image without need to detect the stars and because of that, there is need to tweak any parameters. The source code of the Benjamin's library can be found here https://github.com/bschulz81/hyperbolicfitdll. The sources used in this version of APT are also available in the "Sources" subfolder of the folder where APT is installed.
The InvPower numbers are very big and hard to read (in fact they are small, but in APT they are inverted). So in APT instead of 948 161 073 905 664.00 you will see 14|9.48 (a small tweak by the APT team). It is short form to display 9.48161073905+e14. In other words, 14 is the power of 10 or scale of the number and 14|9.48 is bigger than 13|1.53. This is what we need when are talking about focusing - to know if it is getting better or worse.
Here is example how FocusCraft looks with real data, simulating imaging session. It monitors the quality of the images and is possible to see when there is need to refocus. Pointing the graph will show the data in this moment including the focuser position if such was connected by the time of the analysis.
If the option Calculate is unchecked FocusCraft calculations will be disabled. Note that if automatic refocusing is started via imaging plan of via SessionCraft the calculations will be made no matter if Calculate is checked.
If the stars count is in brackets this means that the current image can't be processed. More information is printed in the Log panel. Usually once the parameters are tweaked there are no problems.
Here is how the FocusCraft looks when ASTAP is used.
Here is how the FocusCraft looks in InvPower mode.
Here is how the settings dialog box looks like. It is possible to make more changes so this is the reason describe them in free form. For the next version will rework this section to look like the other parts of the User's Guide
InvPower - when enabled FocusCraft will be in InvPower mode and the settings below are disabled and not used. 
Use ASTAP - when enabled FocusCraft will call ASTAP to calculate the HFD. There is need ASTAP to be installed and configured in PointCraft Settings.
Star detection SNR - defines the "signal to noise" ratio parameter that is sent to ASTAP. Increase this parameter if you are using DSLR and/or the image is too bright and ASTAP can't detect stars.
Calculate sky brightness - FocusCraft analyzes the image to detect the brightness of the sky. This is needed to identify the stars. 
Use fixed sky brightness - If you want to speed the calculations you can enter fixed brightness of the sky. FocusCraft will take everything with value lower than the entered as sky. The Calculate sky brightness should be unchecked to use this value.
Saturation detection - values closer to 1.0 expect darker images to work. Increasing the value with give possibility to analyze brighter images. The value of 5.0 is empirically found to work fine in most of the time.
Star detection threshold - control how bright the stars should be in order to include them. Lower value include more stars, higher value include less. This depends on the scope and the camera. Default value is 50. If there are no stars detected in the image try to lower it. If you are using DSLR start with a value around 300 and play from both sides till to find a number that gives good number of detected stars. Good number, no matter the camera is not more than 500-600. Usually any threshold that detects less than 50 stars is good.
Min star size - defines the minimum star diameter in pixels need to be included in the analysis. The default value is 6. This parameter helps to ignore the noise without additional processing.
Apply noise reduction - when enabled a noise reduction will be applied on the image before the analysis. It is the most time consuming operation, so use it only when the Min star size can't help because you are using very short focal length scope/lens.
Reduce stars count (mid range) - takes only half of the detected stars excluding the 25% which are most faint and 25% of the most bright stars. Try enable this option if you see huge difference in the detected stars in images with same conditions.
Reduce stars count (high range) - takes only half (most bright) of the detected stars.  Try enable this option if you see huge difference in the detected stars in images with same conditions.
Use Not de-bayered FITS image -  when enabled and the FITS file comes from color camera, FocusCraft will use the image before de-bayering. This could help to detect more stars and measure the HFD/FWHM better.