ACP can automate the task of acquiring flat frames using one of two techniques:
Whether taking sky or dome flats, ACP will automatically adjust the exposure interval for filter transmissivity, and in the case of sky flats, for the changing sky brightness. Either system takes advantage of a flat plan that specifies the filters, binning, counts, and rotator positions, changes focus for each filter, and collects all of your flats in a single automated operation. The flat process can also slew your telescope to a "dew-avoidance" position after flats are acquired. See Dew Avoidance Post Slewing. Finally, you can control the naming and folder location of the flat frames, see AutoFlat File and Folder Customization.
If you've ever tried to take sky flats yourself, you know how difficult it is to automatically get quality sky flats with the right ADU, and still get enough flats to be useful. ACP includes a standard script AutoFlat.vbs which automates the task of acquiring high-quality sky-flats at dusk and dawn. Normally, you won't need to run this script yourself; it's managed by your ACP observing plan when the #DUSKFLATS/#DAWNFLATS directives are included in the observing plan.
ACP acquires sky flats using the minimum gradient position in the sky. This position is on the solar circle near the zenith, offset in the anti-solar direction by 15 degrees. This is close enough for most uses, including precision photometry. For more information and the theory behind this selection, see The Flat Sky: Calibration and Background Uniformity in Wide-Field Astronomical Images, Chromey & Hasselbacher, PASP 108: 944-949, October 1996. Click on the link then scroll down to Printing Options, select Print Whole Paper, then click Send PDF. The paper will appear in your browser if you have Acrobat Reader installed. Thanks to the NASA Astrophysics Data System for making this available online.
If the time is before dusk, the sequence starts with the Sun 1 degree above the horizon at dusk. This is always too bright. Exposures start at the user-specified minimum duration (the shortest possible without shutter vignetting). Using the first combination of filter and binning (flat set) in the flat plan, minimum-duration exposures are repeatedly taken at 1 minute intervals until (at the minimum exposure duration) the mean background ADU falls within the user-desired range for flats.
At this point, flat acquisition continues, with the exposure duration being automatically adjusted for the decreasing light, until the prescribed numbers of flats for that flat set have been acquired. Before taking each flat, the telescope is moved in azimuth a random amount, up to one degree in either direction from the ideal location, so that any stars that might become visible are dithered and will be eliminated by later median combining of flat frames. This process is repeated for each flat set in the flat plan, or until it is too dark to reach the desired mean ADU range for the flat set in the flat plan. During gaps where it is too bright for the next flat set, the 1-minute wait loop is re-entered. Flat acquisition for three binnings and five filters should be complete within a half-hour after sunset.
If it's night and before dawn, the process is reversed, starting with the Sun 9 degrees below the horizon, at dawn.
If you have a lighted flat-box, EL panel like the Optec/Alnitak FlipFlat or FlatMan, a lighted screen, or white area on your dome, etc., you can have ACP acquire automated flats using this light source instead of the sky. All that's needed is a way to control the light source from a command line program on the observatory computer. This has lots of advantages over sky flats, not the least of which that it is not time-sensitive. Depending on light leakage, you could take flats at any time day or night, rain or shine.
The flat plan for light source flats is identical to that for sky flats. Similar to the sky flat process, as ACP acquires flats using the light source, it will automatically adjust the exposure to maintain the mean background ADU within the limits you specify as you change filters. If you have a variable brightness light source, and its brightness can be controlled via its command line program, you can specify light source brightness for each filter in the configuration data, and for each requested binning level 1-4 to account for the sensitivity differences. Thus you can have the light source much brighter for narrowband filters than for wideband ones, and brighter for bin-1 than for bin-2, etc. In any case, ACP will adjust the exposure to achieve the desired mean background ADU. Thus the light source brightness is not at all critical, as you will find out.
Here are some things to be aware of when using the panel or screen flat modes:
The flat process depends on a configuration file AutoFlatConfig.txt (in the ACP config file folder, Public Documents\ACP Config). We have provided a sample to use as a starting point: SampleAutoFlatConfig.txt. You must enter values in the format for your system's language. If your system uses comma for the decimal point, enter fractional numbers that way! Here's what you need to do:
OK, are you ready? Click this button to open SampleAutoFlatConfig.txt in Notepad now.
Upgrading from a previous version of ACP? If so, we recommend that you print out your current AutoFlatConfig.txt and use it as a guide to make a new AutoFlatConfig.txt from the provided/current SampleAutoFlatConfig.txt as described above. Note that CompressFlats is gone!
In any case, the items you must edit for your system are:
This is a test procedure only. See Routine Use below for the normal way Autoflats are acquired.
With all of its flexibility, the AutoFlat system can be confusing if you're an ACP beginner. Fortunately, there's an easy way to do a night's run with both dusk and dawn flats. The key is to first complete the one-time Getting Started section above, where you create and refine a standard set of flats to be taken at dusk and dawn. Once you've done that, you don't need to run AutoFlat.vbs yourself again!
Assuming you want to do both dusk and dawn flats:
#DUSKFLATS
#WAITUNTIL 1, 03:00 ; Start observing at 0300 UT
That's it! With the above conditions, ACP will do your dusk flats, and then start your observing plan which will wait until the right time to start observing. When your observing plan completes, it will wait till dawn then acquire your dawn flats. Of course, you have to start your observing early enough (a half hour before sunset is fine). Here is a sample LRGB observing plan with automatic sky-flat support and observatory shutdown.
AutoFlat.vbs takes flats according to a flat plan file which you must prepare. You can generate flat plans from observing plans created using ACP Planner, or write flat plans with Notepad. You can keep these flat plans for repeated use. Often, just 2 or 3 flat plans are enough for many observing tasks.
The format of the flat plan is one line per flat set. A flat set consists of a combination of count, filter, binning, and (optionally) rotator equatorial position angle, in that order separated by commas. The order of flat sets must be as they would be taken at dusk - with the filter/binning resulting in the lowest sensitivity used first (when the sky is brightest).
5,Clear,1
5,Red,2
5,Green,2
5,Blue,2
You can start lines with a ";" and these will be considered a comment. You can also put comments on live plan lines, starting with a ";". In both cases, comments are ignored. As stated above the rotator PA is optional, and may be omitted (as it was in the above example). In order to make a plan more readable, you can include any number of spaces in the flat set specs. With the addition of comments and spaces, a more readable version of the above flat plan might look like this:
; Bob's flats for 17-Jan-2006
5, Clear, 1 ; Clear at binning 1 is least sensitive
5, Red, 2 ; Red is least sensitive relative to filters alone
5, Green, 2
5, Blue, 2 ; Blue at binning 2 is most sensitive
If your imager has no filters, just leave the filter field in the flat plan empty. Remember higher binning is much more sensitive, so list binning 1 first! For example:
; Bob's flats for 17-Jan-2006
5,, 1 ; 5 flats at binning 1
5,, 2 ; 5 flats at binning 2
AutoFlat.vbs normally runs under control of AcquireImages.vbs. In this normal mode of usage it expects to find a default/standard flat plan in your Plans folder (typically My Documents\ACP Astronomy\Plans):
For sky flats is up to you to determine the sensitivity of your system for each filter and binning combination, and then list them in increasing order of sensitivity for sky-flats. At dusk, it starts out bright, so you want to use your least sensitive filter first. Generally, Red is the least sensitive when imaging a blue sky. And sensitivity goes up as the square of the binning level, so you always want to list your lowest binning levels first, regardless of the filter.
If you're willing to be conservative and waste some time, it's easy to plan your flats. Do the filters from least to most sensitive at the lowest binning, the repeat for each higher binning level. On the other hand, you're going to find that optimal planning of flats is a real challenge. At least you have this flexibility with ACP! Here are some things to consider:
If you have a rotator (and rotator support is enabled), you can (and should) include a fourth item in each line of the flat plan: the equatorial (sky) position angle (PA) for the flat set.
With rotator support, if the telescope is a GEM, half of the flats in each set are taken with the rotator at the specified PA and the other half are taken 180 degrees from the specified PA. This allows making flats for the common case where the target crosses the meridian/flip-point, invokes ACP's auto-flip feature, and thus has a 180 degree rotation in the middle of acquiring its images. The west and east images require flats with rotations 180 degrees apart.
Here is an example of a flat plan for a rotator-equipped system:
; Bob's flats for 17-Jan-2006 - 193.5 sky PA
5, Clear, 1, 193.5 ; Clear at binning 1 is least sensitive
5, Red, 2, 193.5 ; Red is least sensitive relative to filters alone
5, Green, 2, 193.5
5, Blue, 2, 193.5 ; Blue at binning 2 is most sensitive
Note that use of a rotator for multi-target imaging can quickly lead to needing far more flats than you can produce. This is the main disadvantage of using an internal/off-axis guider and rotator. Careful planning of multi-target runs can help. For example, if you are going after three targets over three nights, you can take one set of flats for each target on each of the three nights at dusk and dawn. Take all of the flats for a particular sky position angle (for one target) in one dusk or dawn run to eliminate rotator slew time detracting from the time available for flat acquisition.
In order for a flat field to be effective, the key is for the flat to be acquired at the same mechanical rotation with respect to the optics. For a simple/fork mount, this is always the sky PA plus the mechanical error. If you request a flat for a given PA, ACP will apply the mechanical error it last saw between the sky and mechanical angles. It will put a special field into the FITS header called ROT_PA. This will be the mechanical rotator angle.
For a German Equatorial mount, the situation is a bit more complex. The requested flats will be split between "east" and "west" orientations. Regardless of the mount's actual position during flat acquisition (dusk, facing east and dawn, facing west), ACP will take the "east" flats with a mechanical position corresponding to that used for acquiring images at the requested sky PA, and the "west" flats with a mechanical position 180 degrees from that position. As for simple mounts, the ROT_PA FITS field will contain the mechanical rotator angle.
Besides the lines specifying flat sets, a flat plan may also include the following directives (these are analogous to the directives that can appear in an ACP observing plan). These are provided only for special situations and advanced usage.
(Special situations only) When dawn flats have been completed, the observatory is shut down: the imager is warmed safely, the telescope is parked, and the dome/roof is closed. This does the same things as the #SHUTDOWN and #SHUTDOWNAT observing plan directives, and if the observing plan contains one of these, it is not necessary to include #DAWNSHUTDOWN in the flat plan. This is provided only for special situations.
(Advanced users only!) When dawn flats have been completed, the given script is run. In all cases, the script file is assumed to be in the ACP Scripts folder.
In AutoFlatConfig.txt, you'll see an Advanced Users section. These items have been provided to allow the ultimate in flexibility and optimization. They are described in AutoFlatConfig.txt itself. Here are some of the Advanced User capabilities available for automatic flat acquisition:
After flats have been acquired, AutoFlat can optionally move your telescope to a position for "dew avoidance" (usually a low elevation). To enable this, in AutoFlatConfig.txt uncomment the line PostFlatAlt and set its value to the altitude to which you want your scope moved. Be sure to honor the horizon and safety limits set in ACP and your mount controller! The post-flat slew will go to the altitude you specify, and whatever azimuth the scope was at when flats completed. This avoids a meridian flip on a GEM.
If you want the post-flat slew to go to a specific azimuth, in AutoFlatConfig.txt uncomment the line PostFlatAz and set its value to the azimuth to which you want your scope moved. For this to work, the PostFlatAlt variable must be uncommented and set to a legal value (that's what turns on the feature in the first place!).