Trouble-shooting and AnalysisPHD2 or are connecting to new equipment for the first time, you may have trouble getting the guider calibration done. This problem usually takes one of two forms, each requiring different responses:
- The star moves during calibration but it moves "too far" or "too little." If you've used the new-profile wizard and have provided correct values for focal length, camera pixel-size, and mount guide speed setting, the "step-size" used in calibration should already be correct. But if you've configured your profile by hand or have changed guide speed settings in the mount, you may need to adjust the 'calibration step-size' parameter in the 'Guiding' tab of Advanced Settings. The help content there describes how this parameter is used, and you should be able to resolve the problem quickly. But if you've used the new profile wizard and are seeing problems with "too far" or "too little" guide star movement, the problem probably lies elsewhere.
- The star doesn't move enough during RA calibration, declination backlash clearing, or Dec calibration. These problems are announced by alert messages at the top of the display window. With longer focal lengths, small movements may even be the result of seeing deflections, and the mount isn't really moving at all. Dealing with this sort of problem is described next.
Calibration Sanity-Checks and Alerts
It is also possible that the calibration process will complete but PHD2 will post a calibration alert message saying that some of the results are questionable. This "sanity check" dialog will show an explanation of the issue and some details of the calibration results:
Starting with the 2.4.0 release, there are four things checked by PHD2:
- Too few steps (shown above) - resolving this issue can be easy assuming the mount is actually working correctly. Just adjust the calibration step-size downward until you get at least 8 steps in both the west and north calibrations. If you used the new profile wizard to set up your configuration, a good starting value for calibration step-size will already be set. If you find that the number of steps in RA and Declination is substantially different, you are probably seeing evidence of declination backlash unless you are using different guide speed settings on the two axes.
- Non-orthogonal camera axes - the camera axes are normally computed independently even though they should be perpendicular. The angle calculations do not require great precision, but if they are signfiicantly non-orthogonal, you should repeat the calibration. If you see repetitive alerts of this type and the axes are significantly non-orthogonal, you'll need to identify the problem and fix it. Common causes are bad polar alignment, large declination backlash, or large periodic error in RA. Any of these problems can cause the guide star to move significantly on one axis while PHD2 is trying to measure its motion on the other axis. If you suspect these problems, go ahead and accept the calibration, then run the Guiding Assistant to measure your polar alignment error, declination backlash, and RA tracking error. In other cases, the mount may not be moving at all, and the measured displacements of the star are just caused by seeing effects. This sort of problem should be obvious in the calibration graph at the left of the dialog. If the axis error is relatively small and you are convinced the hardware is working properly, you can avoid further alerts of this type by setting the option to 'Assume Dec orthogonal to RA' in the 'Guiding' tab of the Advanced Setup dialog. But you should do this only if the error is fairly small - otherwise, you are simply ignoring a serious problem.
- Suspicious RA and Dec rates - the guide rate for right ascension should be related to the declination guiding rate by approximately a factor of cosine (Declination). In other words, the RA rate gets smaller as you move the scope further away from the celestial equator (Dec=0). PHD2 won't try to identify which rate is incorrect - it is simply alerting you that something looks wrong with the rates. You can sanity check these rates yourself quite simply. If you are guiding at 1X sidereal rate, your declination guide rate should be approximately 15 arc-sec/sec; with a guide rate of 0.5X sidereal, the declination rate would be 7.5 arc-sec/sec, etc. A declination rate that is significantly smaller than the RA rate is often an indication of substantial declination backlash.
- Inconsistent results - if the calibration results are significantly different from your last-used calibration, an alert message will be generated. This may happen because you've made a change in your configuration. That doesn't imply a real problem, but you should probably consider creating a separate profile for the new configuration. By doing so, PHD2 will remember settings for each of your profiles, letting you switch between them easily. If you haven't made a configuration change, you will probably want to determine why the results are so different.
By far the most common source of calibration problems is declination backlash, which is present to some degree in most geared mounts. With many less-expensive mounts, however, the problem can be severe and can lead to poor calibration and guiding results. Consider the following example of a calibration review dialog:
The first clue to the problem is found by comparing the number of steps required for calibration on the two axes - 10 for RA but 42 for Dec. This shows the mount was not moving consistently in declination, probably because the backlash had not been effectively cleared. This also explains the "wandering" behavior of the declination points (light green) when the guide commands were reversed from north to south. Finally, the computed declination rate is much smaller than the RA rate even though the guide speed settings on the two axes were identical. In fact, this would have triggered a calibration alert dialog. There are actually two problems to be addressed here. First, the calibration result is poor and should be repeated in order to get a more accurate measure of the declination guide rate. Second, the mount is likely to behave badly during direction reversals in declination even if the dec guide rate is correct. The calibration can be improved by first manually moving the mount north at guide speed for 10-20 seconds until consistent star movement is seen in the main window. You can do this with the 'Manual Guide' tool or by using the hand-controller on your mount. Once this is done, most of the declination backlash in your mount should have been overcome. You can then repeat the calibration procedure and probably get a declination guiding rate that is more reasonable. The underlying backlash problem generally requires some mechanical adjustment to the mount. You can try using a backlash compensation setting, but this is not likely to work well if the backlash is large - more than 2-3 seconds, for example. If you can't correct the backlash or reduce it to manageable levels, you should consider choosing uni-directional guiding for declination. To do this, you determine which way the mount drifts due to polar alignment error, and tell PHD2 to guide only in the opposite direction (see Uni-directional guiding). This is controlled by the 'Dec guide mode' control on the'Algorithms' tab of the Advanced Dialog. For example, if the mount tends to drift north overall, restrict guide commands to south-only. This is not an ideal solution, obviously, but you can still use reasonably long exposures and achieve decent guiding results - and there are plenty of imagers out there who use this technique effectively. If you have an unusual circumstance, such as a mount with no declination control at all, you can set the 'Dec guide mode' choice to 'Off'.
Validating Basic Mount Control - the Star-Cross Test
If you are having repeated problems getting calibration to complete without alert messages, you should run a very simple test to see if the mount is responding to guide commands. This test basically mimics what is done during calibration, but it is more direct and can give you a better feel for what's going on. We'll call it the "star-cross" test. The idea is to open the shutter on the main imaging camera, then send guide commands that should cause the stars in the field to trace out a distinctive cross pattern. In other words, you want to get an image that looks something like this:
The angular orientation doesn't matter, that's just a function of how you have the guide camera rotated. What is important is that the lines in the cross are perpendicular and have roughly equal lengths in each of the four directions relative to the starting point in the center. If the image you get doesn't have this approximate appearance, guiding will either be impaired or perhaps impossible. For example, consider the following poor result:
You can see the star has moved along only one axis - only in right ascension in this example. The declination guide commands sent to the mount did nothing at all. Until this is fixed in the mount, you won't be able to guide in declination at all and will have to disable declination guiding to even complete a calibration. There are many other permutations of bad results, each suggesting a particular problem in the mount, the guide cable, or much less likely, the ASCOM driver for the mount. You can safely assume it has nothing to do with PHD2.
Here are the steps for running the test:
- Set the mount guide speed to 1X sidereal. Bring up the 'Manual Guide' tool in PHD2 and choose an initial pulse size - start with, say, 5 seconds.
- Start a 60 second exposure on the main camera.
- Send a 5-second pulse west, then two 5-second pulses east, then a final 5-second pulse west. This should return the star to its approximate starting position. You should wait about 5 seconds after sending each guide pulse to give the command time to complete before sending the next pulse.
- Now send a 5 second pulse north, then two 5-second pulses south, then a final
5-second pulse north. This should again return the star to its starting position.
- Wait for the main camera image to download and see what you get.
One benefit to using this test is that it reduces things to the absolute basics: will the mount move as directed or not. It has nothing to do with PHD2 guide settings because they aren't involved in the test. You may find it helpful to use the test results to communicate with the mount manufacturer or other users who understand that specific mount and its typical problems.
Measuring the Mount's Behavior
If you're having trouble getting decent guiding results, your first instinct will probably be to try making wild changes to the guiding parameters in the hope of finding a magic solution. Thiis almost never works, and you're more likely to just make things worse. If the default parameters from the new-profile-wizard aren't producing reasonable results, the fault is probably with the hardware and you'll need to determine the underlying cause. Once you understand the cause, you can probably improve your guiding results even if no actual repairs can be made - but understanding the underlying problem is important. To understand what the mount is doing, perform the following steps:
2. Use an ASCOM connection to the mount if one is available.
3. Perform a fresh calibration near Dec=0 with the scope pointing at least 40 degrees above the horizon to minimize seeing effects.
4. Make sure there are no backlash compensation settings active in the mount, and set the mount guide speed to 0.5x - 1x sidereal.
5. Run the Guiding Assistant for 10-15 minutes and apply whatever recommendations it makes, particularly with respect to min-move values. Let it measure your declination backlash. You may need to use a large tracking region to avoid losing the guide star during this part of the process - just be sure there aren't multiple stars in the tracking rectangle. The backlash test will move the star a long distance north, so choose a guide star that is nearer the southern edge of your camera frame to give yourself plenty of room.
6. Do not change any of the guide parameters beyond what is recommended by the Guiding Assistant.
7. Take a careful look at the results shown in the Guiding Assistant table. Each entry in the table can tell you something useful about the mount's performance. These results are also written to the guiding log, so they are available for later analysis.
8. If you got calibration alert messages in step 3, you should probably remedy those problems before proceeding. Guiding with a bad calibration is not likely to produce good results. Also, if your polar alignment error is 10 arc-min or more, you should improve on that and then repeat the above steps.
9. Let PHD2 guide for another 10-15 minutes, just letting it run so long as there aren't gross errors from wind or other "mistakes." Do NOT change any of the guiding parameters while this is being done.
If you want to analyze the results yourself, use the PHDLogView tool and the tutorial on Analyzing PHD2 Guiding Results. You should also consult the document on PHD2 Best Practices. All of these references are available on the OpenPHDGuiding.org web site under the 'News' tab. If you'd like some help understanding the results, post both the guiding and debug log files on the OpenPHD2 Google forum and we'll be glad to help you out.
but unsaturated star and try to reach focus with that. Then move to successively fainter stars to fine-tune the focus position.
Bad-pixel map chapter of this document. These problems are different from transient hot pixels, which can be caused by cosmic ray strikes on the sensor. Although cosmic ray hits can disrupt guiding, there's really nothing you can do about them.
- On the 'Algorithm' tab of the Advanced Dialog, you can individually reset parameters by looking at the tool-tip for each field. Hover your mouse cursor over the field and the default value will be displayed. Note that this is not accurate for the min-move settings, which depend on your image scale. This approach is best when you want to restore only a few settings.
- Click the 'reset' buttons on the 'Algorithm' tab for the selected RA and Dec guide algorithms. This is the recommended approach for resetting all the guiding parameters. The min-move settings will be reset to the values originally calculated by the new-profile-wizard. If you subsequently adjusted those settings by running the Guiding Assistant, you should repeat that process.
- Run the new-profile-wizard, accessed by clicking on the 'Manage Profiles' button in the 'Connection' dialog. Use the same camera and mount choices you already have and give the profile a new name. If you want to re-use the dark library and bad-pixel map from the old profile, connect to the new profile and use the 'Darks' menu to import those files from the old profile. Once you are satisfied with the new profile settings, you can delete the old one.
Starting with the 2.3 release, PHD2 uses a camera timeout property to protect against hang conditions. This property is set in the Camera tab of Advanced Settings. and uses a default value of 15 seconds. This means that PHD2 will wait up to 15 seconds after the completion of the exposure to receive the image from the camera. This is a very generous amount of time and should work well for the majority of cameras. However, some cameras are known to create problems by making large bandwith or power demands on the USB subsystem. If you are getting timeouts of this sort and are convinced the camera is working properly, you can increase this timeout value. You can even change it to a very high number - even 1000 seconds or more - so that timeout errors are never shown. Doing so leaves you vulnerable to apparent hangs in the user interface and erratic guiding behavior, but it is a choice you can make for yourself. A larger value for the timeout will not create extra delays during normal camera operations - once the image is downloaded from the camera, the timer is cancelled and guiding will proceed immediately.
Achieving the best possible guiding performance can be a complex task and not something that can be covered here. However, you can get help on the web from a variety of sources, with the document by Craig Stark being a very good place to start:
Dark-library and Bad-pixel Map Alerts
"Use a Dark Library or a Bad-pixel Map" - using a dark library or bad-pixel map reduces the likelihood that PHD2 will mistakenly identify hot pixels or some other image defect as a star. If you choose to ignore this message, you'll be vulnerable to situations where PHD2 inadvertently switches from the guide star to a hot pixel and no longer guides correctly.
Format/geometry mismatches - dark frames and bad-pixel maps must match the format of the sensor in the camera being used. If you've changed the camera in an existing profile, the existing dark/bpm files will not be usable and you'll see this alert message. To avoid seeing the message, you should instead create a new profile when you change cameras. You'll still need to shoot new darks or bpms, but you can keep the old files for use with the original camera. In very unusual circumstances, you may see this message when either the driver or PHD2 code for handling the camera has changed. You might also see a format-incompatibility alert message if you have an old dark library that has somehow accumulated frames with different sensor formats.
In any of these cases, you should rebuild the dark library or bad-pixel map from scratch - more information can be found here: Dark Frames and Bad-pixel Maps
When you first connect to a mount, camera, or other ASCOM-controlled device, you may see an alert message saying that a required capability is not supported by the driver. One example would be lack of support for pulse-guiding by an ASCOM telescope/mount driver, something that can occur with outdated drivers. In these situations, your only recourse is to update the ASCOM driver. These drivers are generally available from the ASCOM web site or, in some cases, from the device manufacturer. As a rule, the best practice is to use the latest versions of these drivers so you don't encounter problems that have already been identified and fixed.
You might also see other alert messages associated with the ASCOM driver for the mount:
2. "Guiding stopped: the scope started slewing." This is pretty self-explanatory, but the determination that the scope was slewing is something reported to PHD2 by the ASCOM mount driver. Whether it was actually slewing isn't known to PHD2. Assuming you didn't mistakenly slew the scope with guiding active, there is probably a timing problem in the driver. If you want to sidestep the problem temporarily, you can disable the logic to check for slewing - go into the 'Guiding' tab of the brain dialog, and un-check the box that says "Stop guiding when mount slews." This will let you continue guiding, but the results might be suspect. The debug log should provide the details needed to describe the problem to the author of the ASCOM driver.
Camera Timeout Alerts
Alert messages associated with camera timing/timeout problems are discussed above: Camera Timeouts
A number of alerts may appear during the mount calibration process. These are described here: Calibration Alerts
Maximum-Duration Limit Alerts
During normal guiding, you may see an alert message saying that your settings for maximum-duration limits in RA or Dec are preventing PHD2 from keeping the guide star locked. If you've decreased these parameters from their default values, you should consider increasing them. However, if the limits are well above one second, this alert probably indicates you've encountered a mechanical problem that needs to be corrected. In the simplest cases, you may have suffered a cable snag, wind gust, mount bump, or other external event that caused the guide star to move by a large amount. In such cases, you simply need to correct the problem if you can and proceed with guiding. But in other cases, the alert may be triggered by a steadily growing guide star displacement that is not being corrected at all. For example, if PHD2 can't move the mount correctly in either the north or south directions, the cumulative uncorrected error will eventually reach a point that triggers the alert. These sorts of problems will require careful diagnosis and correction and simply increasing the maximum-duration limits will not help.
Guiding Log ContentsThe contents of the guiding log will continue to evolve as new capabilities are added. But the basic content is stable, and considerable care is taken to not "break" applications that parse it. If you wish to analyze the log yourself, the following information will be helpful.
The PHD2 guide log will contain zero or more sequences of calibration and zero or more sequences of guiding. Each of these sections has a header that provides most of the information about the guiding algorithms being used and the internal parameters used by PHD2 for guiding. At the start of either a calibration run or a guiding sequence, the last line of the header information defines a set of column headings. The meanings of those columns are shown below:
- dx, dy are offsets from the starting position, in pixels, in the camera coordinate system
- x, y are the camera x/y coordinates of the guide star at the end of each calibration step
- Dist is the total distance moved in the camera coordinate system (dist = sqrt(dx*dx + dy*dy). This is the value used by PHD2 to compute the calibration parameters
- dx, dy are the same as for calibration - offsets from the "lock position" of the guide star in the camera coordinate system
- RARawDistance and DECRawDistance - these are the transforms of dx and dy into the mount coordinates - in other words, they use the arbitrary angle of the guide camera to map from X/Y on the camera to RA/Dec on the mount
- RAGuideDistance and DECGuideDistance - these are the outputs from the various guiding algorithms. The guide algorithms operate on the "raw" distances and decide how far, if any, the telescope position should be adjusted in each axis. For example, with a "minimum move" parameter set, the "guide" distances can be zero even when the "raw" distances are non-zero.
- RADuration, RADirection, DECDuration, DECDirection - these are the values determined by the two "guide" distances above. The "durations" are the lengths of the guide pulses, in milliseconds, needed to move the mount by the distances specified by RAGuideDistance and DECGuideDistance
- XStep, YStep - step-adjustment durations for the adaptive optics device if one is being used
- StarMass - a brightness measure of the guide star image
- SNR - an internal "star-detection ratio" used by PHD2 - essentially a measure of how well the star can be distinguished from the sky background
- ErrorCode - an integer value representing the quality of the guide star measurement:
- 0 - no error
- 1 - star is saturated
- 2 - star has low SNR
- 3 - star mass is too low for accurate measurement
- 4 - star has drifted too near the edge of the frame
- 5 - star mass has changed beyond the specified amount
- 6 - unexpected error
All distance values are in units of pixels. The header for the guiding section will show the image scale as it is known by PHD2, and that can be used to scale the pixel distance values into units of arc-seconds if desired.PHD2, you are encouraged to report them to the open-phd-guiding Google group: https://groups.google.com/forum/?fromgroups=#!forum/open-phd-guiding. Obviously, the more information you can provide, the more likely we will be able to resolve the problem. Using the following guidelines will help in that regard:
- Try to reproduce the problem - if we have a clear set of steps to follow, we are more likely to find a solution quickly. If you can reproduce it, try to reduce things to the minimum number of steps. Remember, we won't have your hardware or computer environment when we try to reproduce it ourselves.
- Try to be complete about describing your configuration - operating system, equipment types, PHD2 version, etc.
- Attach the PHD2 debug log from the session in which you encountered the problem. You can find the debug log in the PHD2 folder in your Documents folder. If you can't reproduce the problem, try to estimate the time of day when you first saw it - this could help us find evidence in the debug log without having to sift through hundreds of lines of output.