Now this software will (should) work with any ASCOM compliant hardware.  Please note, I am not a software developer and there will likely be errors encountered.   I appreciate your patience with trying this and I will do my best to fix problems as they arise.  The documentation below is a first attempt at describing its use and is also a work in progress. 

Please send any questions/comments/suggestions to or post at the scopefocus Google Group

Download 'stable' version from here

I've started using a beta version for changes.  I don't want to disrupt current working versions. The beta version will install separate from the working version.   

Listed as "scopefocus Version 6_beta" in the start menu.   

Download latest build (_beta) from here  


Note: you can always roll back a new version to the previous install by going to Control Panel, Uninstall or change a program, select scopefocus then check "Restore the program to it's previous state"  

Thank you!


Windows 7/8/8.1/10  (Vista and XP should work but are untested)


Nebulosity 4 or 3 (2 is untested but should work)

PHD (1 or 2)

Microsoft Excel (or Excel Viewer) - optional to backup data

For Plate Solve: ansvr (  -- Thank you Andy Galasso!

To Install

Download the latest version from above and run setup.  The Installer will put a shortcut in your startup folder under scopefocus.  Upon installing, the program will start, you can hit ignore when prompted about Nebulosity and PHD not running,  With the first run you should select the location of the nebulosity.exe  (1)Click the window next to "Neb Path:" (It should say C:\)and navigate to the folder, usually,  c:\program files(x86)\Nebulosity3.  The window below this labeled "File Path:" is the location of image storage in Nebulosity.  When using the program this MUST match the "Directory" location in Nebulosity (Bottom Right Button) . 

To Use (Basic Autofocus)


Note:  with first startup (one-time) you'll be asked to set the minimum Nebulosity window size.   Select the Simulator Camera in Neb, Set Exposure time to 10000, Hit Capture Series.   With Nebulosity not maximized, find the width that's just big enough so the status message in the left lower corner of Nebulosity is not truncated (so no "...")  Go to the About tab in scopefocus, click Set Neb Min Size button. 

scopefocus uses this status bar for communication and truncated messages can cause errors. 

Start Nebulosity and select your camera.  Make sure you have "Save Fine Focus info" checked under Edit--> Preferences.  Start PHD.  Start scopefocus (start button --> All programs --> scopefocus--> scopefocus). Add an equipment description for your scope. (2) (Type in the list box and push "Add" to save)  (3) Check any additional equipment on the buttons to the right.  You will need to define the maximum travel (4) for your focuser (i.e. number of steps to all the way out).  Leave movement delay at default for now(500msec). 

Set default stepsize (5) (in number of steps).  This will be used for generating a coarse V-curve.  Ideally this value should be such that racking the focuser out 10 'stepsizes' produces a symmetric V-curve.  A good place to start might be 0.5 -1% of the total focuser travel (max travel).  

Connect to ASCOM equipment(6).  Uses standard ASCOM chooser.  All are not necessary depending on what features you plan to use.  Connecting to a mount is necessary for repeated focusing at defined intervals.  The switch is for automated flat panels(new, relatively untested).   

You will need to put a value in the textbox next to the backlash button(7).  True backlash compensation is not necessary, but the program needs to know how far to move the focuser to overcome backlash with direction changes.  Checking the box to the right will turn on backlash compensation.  For this I recommend an accurate determination of the exact amount of backlash (discussed later).  For now just a ballpark. This can be found by seeing how many steps it takes to produce the slightest movement after a direction change.   

Determine "Reverse" status:(8)

IMPORTANT:  I recommend using your focus driver control to move the focuser out a good distance from full in before moving with scopefocus.  Go to the control tab, Click the "Rev/Out" and make sure it moves in the proper direction.  If not, go back to setup tab and check "Reverse". 

Other functions in setup will be covered later...

Basic Focus:

Move Focuser In/Out using buttons.  Stepsize was set previously and corresponds to the "coarse V-curve" step size.  To goto a specific position, enter the number and push "Goto".  to Define your current position enter the value in the textbox next to "Current Position:" (9) 

To generate a V-Curve, you will need to know roughly where the focus point is.  You can start by increasing the stepsize and racking out manually.  Once rough focus is known, run a coarse V-Curve(10).  Have Nebulosity running in "fine focus" mode on a medium brightness star (mag ~4 is best), adjust exposure time so when in good focus it's not saturating (max ADU < 65000).  With a focuser starting position about 5 steps "In" from the rough focus point, click "coarse".  The focuser should move out the appropriate number of steps with each exposure.  Now you have a fairly accurate focus point that can be used to generate "Fine V-curves".  (11)These are generally smaller steps (about 25-50% of coarse) and more data points (~20).  You will need at least 5 of these saved for "GotoFocus" calculations, more is better.  

Calculation data is obtained by repeated Fine V-curves using the middle (linear) portion of each side of the "V" (12) .  Run a Fine-V, making sure the "Save V-curve data" button (14) is NOT checked.  Look at the graph and determine where the linear portion is, usually the middle 50-75% of each side (note blue versus red circles on V-curve below).  Enter values for "HFR Min" and "HFR Max" (13)  to define this region.  (usually ~ 150 and 300).  Now check "Save V-curve Data" (14) , set Fine-V repeat (15) to the desired number of V-curves to obtain, set the number of exposures to each focus position(1 is fine, more is better--so 5 v-curves of 4 exposures each point is like 20 V-curves).  The data will show up in the table as it is calculated.  

Look at the data and delete any outliers.  Highlight (16) the row and click delete selected (17).   The most useful number to look at is the PID.  This is the position intercept difference (difference between upslope intercept and downslope intercept) and is a good indicator of symmetry.  Lower and consistent is good.  Once you have some data you can use "GotoFocus". 


V-Curve data can be saved or manually edited by exporting to an Excel spreadsheet.  To export, click in the blank box next to Export, browse to a location and select a filename, click Save to select, then click the "Export" button.  To import from saved excel file, click the blank box next to Import, browse to the excel file, click open to select, then push the "Import" button. 

GotoFocus will sample the star size at a predetermined position away from the focus point, calculate where the focus point should be based on the average of all the V-curve data, then move to that position.  Start by selecting upslope (out from focus) or downslope (in from focus).  The standard deviation can be used to select the one with the most consistent data.  The sample position is the number of steps from the approximate focus point where GotoFocus will sample.  Have Nebulosity running in Fine Focus mode on an unsaturated star, push GotoFocus, the focuser will move well past the sample position to take up backlash, then back to the sample point and measure the HFR.  The number of samples is set the same as "Set N" for Coarse V-Curve, must be 6 or more, generally 10 is sufficient.  Without changing directions, (so no backlash involved) it will move to the calculated focus point.  The HFR should now be as low or lower than the lowest obtained with you fine V-curves.  If not, backlash usually didn't get completely 'taken up', try increasing the backlash value on the setup tab. 

Full frame metric focus:  (refined in beta ver_6.2.1.x)

This uses a full frame download average HFR at your target location.  No need to find a mag 4 star and no need to slew if that star is not in the target image frame!!  To use, as in single star focus, find the approximate focus point by doing a rough v-curve on a any single star (as discussed above).  Then check Metric Focus "On" (1) and perform a "Metric V" (2) curve with 10-20 points (3) .  Adjust the step size (4) so the change in HFR is about 3x (e.g. in focus HFR = 100, to end of V-curve HFR = 300).  Look at the V-curve and determine the min and max HFR (same as above (13)) for the linear portion of the V-curve.   Repeat the fine v-curve this time save the data (5).  There should be at least 3-4 used data point on the linear portion of the curve.  Select (click left most cell) this line in chart to use for gotofocus (see (16) above)  Make sure the focus sample position (6) is in the mid to lower portion of the v-curve (generally 3-5 times fine V step size).  Click gotoFocus (7), focus will move to the sample position and an image (or more if N (8) set for more)  will be obtained, the 'in-focus' point calculated and focus moved to that position.  A second frame will be obtained and analyzed to ensure improvement.  If not improved, it will automatically use the other side of the v-curve and repeat.   


This (and many other features) requires additional Nebulosity control needing a script to put Neb into "listen" mode:  For this you'll need to create a script called listenPort.neb and place it in the folder where Nebulosity.exe is located.(usually  C:\Program Files (x86)\Nebulosity#)   All the script needs to say is ListenPort 4301.  (In Neb select Edit-->Edit/Create script, scroll down to LitenPort and set value to 4301, select that line, double click, then save script)

Filterwheel control is via ASCOM driver and is fairly self explanatory. 

Sequence control of multiple filters and repeated focusing requires ASCOM mount connection and will also be discussed later.

Flat panel control is via ASCOM switch.  Uses SetSwitch(), true moves the flat to the ON(closed) position, false is OFF(open).   SetSwtichValue() will set the level.  The ability to set level is not necessary as exposure time can be adjusted to achieve proper flat saturation. 

"Flat Auto Exposure" will automatically adjust exposure time to achieve a desired Goal saturation and is described here Autoflat


The Automation tab contains controls for moving the mount.  If a re-focus star is used outside the target image FOV, set the position of the focus star and target.  To re-focus the mount will slew to the focus star and back to the target when done.  It the focus star is in the FOV, enter is coordinates in the appropriate textboxes.  To do this, take an exposure using Frame and Focus in Neb, move the cursor over the focus star and note the cursor position, bottom right corner of Nebulosity main window.   There are a few methods for pausing/resuming PHD guiding, for now the default (resume on same star) works best. 

See Automation for additional details.


Messaging can be used to send text or email notifications of any software errors.  I will eventually add PHD guiding notifications as well. 

Dual camera control is intended for a second camera being OSC only.   The software will synchronize/pause the exposures and re-focus of both cameras to minimize lost frames of the second camera.   This utilizes a second copy of Nebulosity that must be started from Nebulosity File--> "Launch new instance".  Then start another instance of scopefocus and check "Enable Salve Mode".  Check "Enable Server" on the original scopefocus.  Once the sequence is set push "Go" from the Server copy.  The number of subs on the Slave copy is determined by the Server.  The intent is to utilize a second OTA and OSC camera for wide-field shots....bonus images.   



The last tab (MeridFlip) is in the works....

Plate Solve:

Allows slewing to plate solved location from previous image.  You can also sync your mount to a given location, and repeat to desired tolerance.  (theoretically this can replace mount goto calibration).  Target and focus locations can also be defined by solving an image.   Generally a short exposure (5-20sec) works best.  Jpg files work as well.  Set the High and Low parameters to match the high and low dimensions of your FOV.  Adjust sigma and downsize if needed so it uses about 50 source stars.  Or, use the option if you have internet access (no parameters needed).  Helpful for images that won't solve using the local method or images that have an unknown FOV (like someone else's image).

You can now use an image to designate your target and focus positions.  Check the "use Image" Box, click adjacent space then select your image.     Click "Set", it will plate solve and set your target/focus location.  Click the "Goto" button to slew.  

For Ver 6.2.x.x (Beta):  For Local plate solve (faster) Install ansvr ( including index files.  Previously loaded index files can be used, just point to them during ansvr setup (they are usually here:  C:\cygwin\usr\share\astrometry\data).

For Ver 6.1.x.x:  (unstable...use beta version for best results) Plate-solving via Astrotortilla setup for astromety.  NOTE: you'll need to create a folder called astro in c:\cygwin\home.  

To view fits tables, click "View Tablist", select a fits table file (index.xyls, .rdls, .axy, .match, .corr) a text file (table.txt) will by written in c:\users\'username'\appdata\local\cygwin_ansvr.  You must have tablist.exe in C:\users\'username'\appdata\local\cygwin_ansvr\tmp to use this. 


There is also a Polar alignment assistant.  Enter the Alt and Azm error (e.g. as determined by PHD2 drift or Astrotortilla) slew to a reference star(preferably high in the sky near the celestial equator) then push "PA-sync" to select the current position, then push "PA-Slew" and the mount will slew to where it should be if polar alignment was accurate.  Now use the mounts Alt/Azm adjustment screws to move the star back into the FOV, the mount should be polar aligned.    

Meridian flip control is untested and should not be used unattended at this point.


Slew to Offset:  Check "Sync without Slew" and "Neb Image" boxes in Plate Solve Settings.  Capture an image in Nebulosity, if off center, put cursor on desired center position, note the X,Y position (Lower right corner of Nebulosity) Enter Offset Pixel position, push Calculate Offset to determine RA/DEC of desired center position.  Push Slew to Offset to re-center.  NOTE: for this feature you'll need to copy tablist.exe (.zip below) to c:\cygwin\lib\astrometry (non-beta only).




Latest Beta Version

--added Nebulosity window autoresize

        fixes Neb Status monitor error when window too small and "..." in statusbar

Beta Version

--added Clipboard communication with Nebulosity (better)

            check "Use clipboard" on setup tab (now default) 

--added additional DEBUG logging (checkbox on About tab) 

--added sequence Reset button to clear sequencing data

Beta Version

-- added fits table viewer

            converts fits binary table to text file.

Beta Version

--fixed plate solve now using ansvr

            bypasses the server uses local Cygwin solve-field

Beta Version

 -- refined Full Frame Metric

            use a single exposure per focus position v-curve for each imaging target

            use a single sample point around the mid portion of the v-curve for Gotofocus   

 -- added focus determination quality checks.  

            checks for obvious miscalculation

            repeat exposures at calculated focus point to ensure improvement.             

Beta Version

 -- added online platesolve capability.  

Current Version

 -- Multiple Neb 4 compatibility updates

 -- added Gotofocus error checking:

            If calculated focus position is too far from sample point, repeats up to 3 times.  

            Also, samples HFR after focus move and tests for improvement vs sample point

            If no improvement, repeat using opposite side of curve OR 

 -- obtains camera info from Neb, if Simulator, disables error checking

 -- Windows 10 testing without issues.  


 -- multiple version numbers advanced in sorting out new publish method

 -- fixed Autofocus after N subs

 -- refined Slew to offset  


 -- added preliminary Internal Filter Wheel support.  Make sure filter wheel is at lowest position (0 or 1)

uses Nebulosity filter index (lowest = 1).  Sends command SetFilter N via socket.    


 --fixed focuser position display


 --fixed problems with blank messaging parameters


 --fixed import/export process.  Click import or export button, if no file displayed then browse dialog opens, select/enter import/export file, click open/save to complete. The filenames can be manually entered/changed by clicking in the textbox, then click import or export.   Clearing then clicking the box will bring back the browse window.   


 -- (minor) allow for .TXT (all caps)



 -- allows import from .txt file.  Select from Import file browser, click import button



 -- can export to .txt file (CSV).  click open field next to export, browse to desired location, enter filename that ends with .txt  click export button

 -- automatic update check w/ each startup (must have internet connection on startup o/w select skip)

 -- revised log so saved per day

 -- added separate Filelog2 method



 -- fixed unable to do repeated GotoFocus while using metric

 -- updated excel import to account for VSD 2013 compatibility



 -- removed redundant position limit error handling. 



 -- removed backlash compensation.  still enter value for backlash to ensure motor travels far enough to go through backlash with direction changes.  Exact corrections are not made (or needed)



--added online deployment 

--added easy updates online via check for updates button on "About" tab  


--minor PHD2 communication fixes



--Fixed Equipment labels for Reducer, extender and AO

--Added Slew to offset (center here) function.  Will slew to position based on entered Neb capture cursor position.  Enter cursor position that corresponds to desired center of image, push Calculate Offset to determine RA/DEC, then hit Slew to Offset to slew.  (Requires Cygwin and installation)



-fixed PHD2 compatibility issues

-guiding should resume from any PHD state