Bias Frame Stability

In the course of chasing down a weird problem, a couple of issues came up in discussions with other people.

Does the Bias Master frame change at different temperatures?

I.e., do I need separate Bias Masters at each temperature, or does one master work at all temperatures? Maxim is clearly set up to use different temperatures.

I generated Bias Masters at several temperatures from 0C down to -13.5C. This was as low as I could go, since Arizona is still too warm for the camera to get any cooler. Forty subs were taken directly in Maxim and converted to the Bias Master in Maxim using the SD Mask combine of 40 subs. The subs were taken after the new temperature set point appeared to be stable (roughly 20-30 seconds after the set point was reached). I ran a couple of them twice to see how much variation might be seen from run to run. Also, I have a couple of older masters (1-2 years old) at -15C and -20C.

For each master I measured the median intensity at the center of the image using Maxim’s Information tool with the biggest aperture available (20 pixels).


It seems clear that the recently built masters are the same out to -13.5C. The colder ones are likely too old, which is why they are different. I would not expect some dramatic shift from -13.5C to -15C.

Is it necessary to wait some period of time for the CCD cooling to stabilize?

In discussions with Joe Mize (he has had a number of interesting points!), he pointed out that he waits a couple of hours for the CCD to stabilize before taking Bias frames (he calls this “cold soaking”).

As a typical impatient person, I generally set the cooling target, set up the AutoSave sequence to take the desired Bias and Dark frames, then start the imaging. The Bias subs are taken first, for no particular reason. As the temperature approaches the set point the temperature typically oscillates a bit around the set point as the system control settles. This usually happens for 15-30 seconds. Once the cooling target appears to be stable I start the AutoSave acquisition.

Now Joe indicates I need to wait a couple of hours:(

So, I did a couple of runs. Run 1: I set the cooling point to -10C, waited as usual for the temperature to settle, and took a set of 40 Bias subs. These were combined into a master in Maxim’s Set Calibration tool using SD Mask median combination. I then used the Graph Information tool to draw a horizontal line in the exact center of the image.

After 30 minutes I took another set of 40 subs and created another master. I repeated this process at 1 hour and 1.5 hours. The following animated gif flips among the resultant graphs. The red text at the upper right indicates the elapsed time before creating the master.


It appears that the initial master is in fact somewhat lower than the subsequent graphs by 32 counts (about 1.5%). After 30 minutes the graphs seem to be relatively consistent. So, it looks like I do in fact need to wait perhaps 30 minutes.

Run 2: I turned the system off for about three hours, then repeated the test. This time I created a master every 5 minutes in order to get a better estimate of when it has stabilized.


I should have changed the label at the top; 1 is the first master, 2 is after 5 minutes, 3 is after 10 minutes, etc. It looks like by 10-15 minutes the masters have equilibrated.There is less of a shift (15 counts, or 0.75%); perhaps the system didn’t completely warm up from the previous test.

So, it looks like I should let the system cool for 15-30 minutes before starting the Bias frames.

I might expect the same effect when taking darks. However I expect the issue to be less noticeable since the subs are typically 15 minutes or so; the first sub might be off but subsequent subs should be equilibrated. There might be an effect if doing short subs like 1 minute.

Another Measure

I was reading an interesting article Signal to Noise: Part 3 – Measuring your Camera by Craig Stark. I thought it would be fun to go through the exercise of measuring the various characteristics of my STF8300M.

One of the checks is this very topic – how long does it take your camera to cool to a stable temperature? His approach is to turn on the cooler, then start taking 1 minute dark frames. He expects to see a pattern in the beginning followed by a steady state dark median after some time.

In my case, the camera reached the target within 1 minute! Only the first dark showed any significant difference while the camera cooled.



Single Star versus Multi-star guiding in Maxim

I have always used single star guiding in Maxim. However, in Maxim version 6 they implemented multi-star guiding. I wanted to test the multi-star compared to the usual single star.

Basic conclusion: multi-star guiding does not show an appreciable gain in guiding precision. There may be other reasons for using it; perhaps it is more robust somehow, perhaps it is better in poor seeing conditions? I was unable to test these issues; I just looked at guiding precision.

The clear difference in guiding was better seeing as the night went on. The initial guiding started after astronomical twilight. Both guiding techniques improved significantly as the evening went on. I often see this trend when using the Subframe Selection script in PixInsight; as the evening wears on the FWHM moves steadily downward.

Data Collection

I imaged several 5 minute exposures, binned 2×2, using the Edge 11/STF8300M setup. The guider is the integrated STi in the 8300 package. This setup has an image scale of 0.80 arcseconds per pixel.The STi is binned 1×1. The same calibration settings were used for Single star and Multi-star guiding.

The images were well guided; I happened to have better seeing this night. In poorer seeing I typically see larger fluctuations in the guide errors. It may be that multi-star guiding would help more in poor seeing.

I used three targets: one in the Milky way to ensure a good number of guide stars for multi-star guiding, and two targets with few guide stars. The images are not calibrated or stacked, although the Maxim Filter tool was used to remove hot and cold pixels.

I measured the guiding accuracy using the graph tool in Maxim. After guiding has been started I clear the graph and let it run for 30-50 points. I then read the RMS X and Y errors from the graph, clear the graph, and repeat. In each situation (single or multi star guiding, a particular target) I repeat this process 5 times and average the results.

I also measured the FWHM of the resulting images using both CCDInspector and PixInsight. Their results were essentially the same, which is reassuring.



This shows the RMS guiding error as the evening went on. The green points are using single star guiding, the blue use multi-star.

In the first half of the graph the RMS errors are more variable. In the second set of three readings the guiding has settled into a more consistent pattern.


These are the FWHM measurements from PixInsight (in pixels). The first image in particular was poorer (3.3 px * 0.8 as/px = 2.64 as. The last six images are around 2.4 arcseconds.

Moon Effect on images

I have been wondering about the effect of the full Moon’s light on images. In particular, there is a tempting thought that if your target is far enough from the Moon in the sky, perhaps the Moon’s effect would be negligible. Also, I noticed something in ACP Scheduler that sounded like you might be able to image at angles greater than 120 degrees from the Moon. Since we are having a full moon now, I thought I could try a simple test and see what happens.

I set up an ACP plan to take images every hour through the night. Each hour, ACP would:

a) Focus the Edge 11

b) Take 3 one minute unguided images at a position 60 degrees altitude to the SouthEast using the Luminous (Clear) filter. These images are at some angle from the moon, as given by theSkyX. This target point yielded images at angles of 23 to 55 degrees from the Moon.

c) Take 3 more one minute unguided images using the OIII filter

d) Take 3 more images at a second target position to the NorthWest, again at 60 degrees altitude. The second position was simply to give me points at a greater angle from the moon; I got angles of 75 to 115 degrees from the moon. This target is in the Phoenix light dome so I expect to get higher counts.

e) Take 3 more images with the OIII filter.

f) ACP then sleeps until the next hour is up, at which point the steps above are repeated.

Since my images are at a set Altitude/Azimuth, the images produced are different for every hour. The contents of the images are irrelevant – all I am interested in is the background count.

The Moon rose at 10:43 at 85% illumination. The first set of images were taken at 10:00 PM while the Moon was till down, so that should give a “zero point” for comparison. At this time the Moon was 9 degrees below the horizon.

I used CCDInspector to retrieve the background and contrast for each image, then averaged these values for the three images at each point/filter. Some of the OIII images did not report a contrast, presumably because there were no stars really visible in the image.


Raw Images

Raw Background counts as a function of angle from the Moon.

Figure 1. Raw Background counts as a function of angle from the Moon.

The graph shows the effect of the Moon’s angle on the background counts of the raw Luminous and OIII images.

In the Luminous images there is a clear trend toward less background as the angle from the moon is increased. The values at 200 degrees are those produced when the Moon had not yet risen. It seems clear that the Moon’s effect is in fact negligible once the angle gets to 120 or so. Logistically it may be difficult to this large an angle between the Moon and target. Perhaps some Northern targets could be imaged when the Moon is to the South.

I am surprised at the OIII results. It appears that the OIII background does not depend on the Moon’s angle. Even when the moon is not yet up the background is the same. However, I have previously determined that the Moon scatters a significant amount of OIII light when it is up. Perhaps the Moon was close enough to the horizon to scatter a lot of OIII? I do not understand this result.

Calibrated Images


Effect of the full Moon on calibrated image background values.

Figure 2. Effect of the full Moon on calibrated image background values.

Calibration is performed by Maxim using Bias, Dark, and Flat frames. I had anticipated that the calibrated results would follow the same pattern as the Raw data. As seen in the graph, this is roughly true for the Luminous images. The points in the Phoenix light dome (blue triangles) have higher values, but they are dropping toward the zero point. 120 degrees may not be sufficient to approach the no-Moon case.

However, the OIII results are all over the map. Most of them are at a constant level, but some of the points have very large backgrounds after calibration. Again, I do not understand this variability.

Contrast Results

It turns out that the contrast measured by CCDInspector depends on the contents of the image. If there are a lot of stars or structure the contrast will be higher. This is fine when comparing images of the same target; a higher contrast in this case indicates a better image. However, in this data the contrast readings are random since the image field is different at each point (I am keeping the image at 60 deg Altitude and a fixed Azimuth).


It is not worth it. When the Moon is up, there is still significant light in the calibrated images out to angles of 150 degrees. It may be possible to do something with narrowband filters, but the data there is confusing.

Stay with imaging when the Moon is down.

Sky Flat target ADU level

There seems to be a bit of minor quibbling over the desired target level for taking Sky flats.

  • The PixInsight forum suggested a Target ADU = 40,000 somewhere.
  • The Wodaski book uses a formula

ADU = FullWell / eGain * bin * %brightness
For 8300,
FullWell = 25,500   (spec)
eGain = 0.53  (from FITS header)
%Brightness = 0.3 – 0.5   assume 0.4  ===>    Gives Target ADU = 38000

  • The sample ACP AutoFlatConfig file has a default value of 20000 +/- 4000

I had been using 38000 +/- 50000. I noticed that sometimes exposures were “overdone”, where the vignetting effect of the flat results in an “anti-vignetted” image. Dark in the center, lighter around the outsides. I think this is particularly happening with HAlpha shots, perhaps with shorter test shots. I tried making the HAlpha flats with lower targets (20000) thinking that the values were too high, causing too much offset in the image or something. However, I still noticed occasional anti-vignetting.

So, what is the effect of using different ADU targets?

  • I created 3 different Master HAlpha flats with target levels of 20,000, 30K, and 40K target values. 25 frames of each, combined in Maxim DL6 using the SD Mask combination method.
  • I took a single 10 minute test Halpha frame from an STF8300 with HAlpha filter.
  • I calibrated the test frame with each of the 3 Halpha Flat masters. Each calibration used the same Dark and Bias frame masters; only the Flat masters were changed.


A big disappointment – it doesn’t seem to matter which Flat master I use! Visually the 3 calibrated frames look identical. No anti-vignetting, I can’t tell the difference between the frames. Pixel Math shows the resulting frames have the same values within +/-2 ADUs, which I assume is due to very slight variations in the Flat frames.

So, I guess I’ll go back to the 38000 range again. The odd frames must be due to some other effect. At least I don’t see the effect in regular images, just in short duration test shots. I think.

PixInsight versus Maxim: Subframe Calibration Comparison


While trying to process some images taken with my SBig STF-8300M in PixInsight I was encountering problems; PI would not
correctly read images from my SBig STF-8300M, either the original image collected by Maxim or the calibrated image. This seems to have to do with whether the images are saved in 16-bit signed or unsigned format; there is a lot of discussion in the PI forum about how this should be done, Maxim using non-standard FITS files, etc. In the end it appears the “fix” is to manually reformat all of the calibrated light subs in Maxim into 32 bit floating point format.

During the forum discussion people made statements like

      It’s a really bad idea to let maxim touch your files at all… the less maxim does, the better.
      Stop letting maxim calibrate images and do it all in PI. the results are superior anyway.
      Avoid MaximDL like the plague once it has captured the image.

Interesting. Until now, I have been happy with Maxim calibrating the images. It is easy, happens automatically under ACP/Maxim, and the only problems encountered were caused by Some Idiot using bad flat or dark subs. Googling around, I do not find any studies showing the relative performance of Maxim versus PI in the calibration of images. I don’t know the source of these statements indicating the superior performance of PI in calibration.

On the other hand, my earlier tests on image alignment showed that PI was superior to Maxim and Registar. Maybe PI has better performance in calibration? Would this offset the extra manual work required to prepare and calibrate the images for PI
calibration (compared to almost no effort in Maxim calibration)?

So, here goes my test. Does PixInsight calibrate light subs better than Maxim?

Test data

I assembled a test data set of bias, dark, flat, and light frames. I use the same frames for calibrating under both PI and Maxim.

  • 1 light frame (an OIII light sub, 30 minute exposure). This is the image to be calibrated. The camera is trying to get to -10C, but the ambient is high enough that the actual temperature is -4C. I just grabbed a sub from last night’s imaging run. Maxim calibrates using the original file. Since PI cannot open this file correctly, it uses a copy of the same file saved as 32 bit floating point.
  • 20 Dark frames at -10C, 30 minute subs each. Collected in Maxim.
  • 25 dusk sky flats with OIII filter collected in Maxim under ACP’s control. These flats are between -5 and -10 degrees C; at dusk the ambient temperature is still around 100 Fahrenheit so the camera can’t quite cool to -10C.
  • 40 Bias frames at -10C collected in Maxim.

In PI, I set the probe to display values in 16 bit integer mode. Hopefully this allows comparison of “ADU” units with the
corresponding Maxim values.

The Maxim calibration involved using “Set Calibration” to load the various calibration individual subs into Maxim and clicking
the button that creates Masters for the groups of files (Bias, Dark, and Flat). I then opened the raw file and clicked “Calibrate”.

Maxim Calibration results showing the nebula (upper left) and the 3 master files. Click for full size.

Maxim Calibration results showing the nebula (upper left) and the 3 master files. Click for full size.

In the fight to get PI to calibrate the images, I tried several different cases as listed below. The various cases are variations on using floating point versions of the various calibration files for PI.

Note that only Case 4 adequately calibrated the images.

Case 1 – All files float

+ all files (bias, dark, flat, light) are exported in floating format from Maxim
+ FITS configured to rescale with 0-65535

FITS file config used to access floating point files.

FITS file config used to access floating point files.

Result: the PI conversion runs, but is not correct.

All individual subs (light, dark, flat, bias) exported from Maxim as 32 bit float. PI builds its own masters. Click to enlarge.

All individual subs (light, dark, flat, bias) exported from Maxim as 32 bit float. PI builds its own masters. Click for full size.

  • Calibrated image is too dark, zeros in background, no nebulosity.
  • flat is wrong; it looks a lot like the bias.
  • values in the PI created calibration master files are different from Maxim.
  • Bias ranges 40000..15000..40000 across frame.
    Maxim => 19500..1900..1950
  • Flat ranges 0..6000..0 across frame
    Maxim => 15500..18000..15500
  • Dark values around 1000 across frame
    Maxim => around 300 across frame

Case 2 – Fits configuration at 32767

This was the same as Case 1, except that the FITS configuration is set to 0..32767 instead of 65535. This was tried in an attempt to address image values being off by a factor of 2.

Result: PI Conversion fails to run.

After PI calibrates the individual flats the integration process tries to stack the flats to make the master. This process fails because one of the calibrated flats is “open in another process” and cannot be opened. On different runs, it will be a different file that is open in another process.

Case 3 – Use Maxim calibration masters

It turns out the Maxim calibration masters are already in float format. This case uses those masters directly PI, rather than converting the individual subs to float for PI to create its own masters.

FITS is configured as 65535 again (for the light frame).

  • Result: Calibration runs, but it looks like the flats are not correctly applied.
  • Dust motes are visible.
  • Darker center of image. Looks like flats are too strong?
  • Values (flat, dark, bias) of the masters when opened in PI match those reported by Maxim.

Case 4 – Use original individual 16 bit Maxim calibration files

Another weirdness – it turns out the individual calibration subs created by Maxim are readable by PI, even though they are in the same 16-bit format which doesn’t work for the light frames. For unknown reasons the calibration files can be read.

So, in this case allow PI to use the original Maxim individual subs to build it’s masters. The only thing different between PI and Maxim processing in this case is PI starts with the float version of the light sub.

+ Calibration files (bias, dark, flat) are left in “16 bit” state as created by Maxim. No conversion performed.
+ Light file is exported in 32 bit float format. Can tell this is necessary because PI does not open this 16 bit file correctly.
+ FITS configured to rescale with 0..65536

Result: As seen below, the calibration looks pretty good, very similar to the Maxim result.

PI calibration using Maxim individual calibration subs directly to create its own masters.

PI calibration using Maxim individual calibration subs directly to create its own masters. Click for full size.

  • Dark master displays around 2000 “ADU”, versus Maxim’s 300.
  • Bias master is slightly lower than Maxim: 1870..1800..1870
  • Flat master is similar to Maxim, 15800..18000..15800
  • Bias has much larger values than dark. I don’t understand this. However, the same thing is true in Maxim, so OK.

Comparison of PI versus Maxim calibrated light sub

So, how does the case 4 calibration of the light frame differ between the Maxim process and the PI process? The image below shows the two images, where the left image is the PI result and the right image is the Maxim result (converted to float).

PI and Maxim calibration results. Click to enlarge.

PI (left) and Maxim (right) calibration results. Click for full size.

Visual results:

  • The Maxim file is smaller, 2Mb versus 8Mb for Float form. The PI result is also an 8 Mb xisf file. I don’t know how Maxim got the file down to 2Mb, maybe that is a clue why PI can’t open it?
  • PI result has more hot pixels.
  • PI result has more noise (much grainier to my eye).
  • Stars look the same (roundness, brightness) even when zoomed in significantly.
  • Maxim result may have more dark pixels; a little hard to tell because of the increased noise in the PI image.

Tool Measurements

I used several PI tools to measure the noise and SNR for the converted images. Measurements for the Maxim result used the Maxim calibrated image converted to 32 bit float.

Statistics tool results:

Maxim K    PI K
count (%)   99.75290    99.95980
count (px)  2116573    2120963
mean        0.0072616    0.0075407
median      0.0071210    0.0072508
stdDev      0.0068079    0.0073814
avgDev      0.0011528    0.0013096
MAD         0.0009753    0.0009751
minimum     0.0000006    0.0000476
maximum     0.9739980    0.9766412

  • PI has more pixels?
  • PI has slightly higher background (median)
  • PI has larger deviations

Noise comparison script:

The NoiseEvaluation tool was used after performing a linear fit on the PI image to match it to the Maxim result.

PI    = 8.6e-4
Maxim = 9.34e-4

  • Maxim has slightly more noise? This does not jive with what I see visually.

SNR Calculation:

Calculated the SNR ratio as SNR ratio = MAD / Noise
PI = 1.13   Maxim = 1.044

  • Again, the PI result seems to have a slightly better SNR ratio by 0.09, although visually I wouldn’t have thought so.

ContrastBackgroundNoiseRatio tool:

Parameters: Background percentile 100th  cycle-spins 8
Maxim    PI
Median        466.48    475.15
Contrast        61.31    68.67
Background Mean    466.41    481.45
Background Noise    66.63    77.95
CBNR        0.92    0.88

  • This tool indicates the Maxim result has a better contrast (0.92 vs 0.88) and less noise (66.63 vs 77.95).


Visually it seems clear the Maxim result is better. The various PI tools indicate that the two calibrations are fairly close; some tools indicate the Maxim image is better, some indicate the PI image is better. One might suspect I am not running the tools in the correct way:)

Case 5 – Case 4 plus Superbias and optimized dark frames

I turned on the optimize dark frames parameter (0.004) in the Darks frame screen. I also created 2 Superbias frames, one based on the Case 1 Bias master (from float format bias frames) and one based on the Case 4 bias master (based on master created from original Maxim bias subs).

Adding Superbias and dark frame optimization. Click to enlarge.

Adding Superbias and dark frame optimization. Click for full size.

This did not work. The background is over-reduced (lots of zero values). Somehow the superbias is not working correctly. Both superbias files had the same result.

I also tried only setting the Optimize Darks parameter = 0.004. This is the only difference between this frame and the Case4 result. It is fairly indistinguishable from the Case4 result; optimizing the darks didn’t seem to help any.

Thus, it seems that

  • the superbias makes things worse, and
  • optimizing dark frames does not help appreciably.

Final Conclusions

  1. The Maxim calibration appears to be at least as good as the PI calibration; I think it is better.
  2. There may be further fine tuning possible in PI to improve the results.
  3. Using PI for calibration requires a lot of manual operations compared to the almost automatic operation of Maxim. I see no reason to change to PI for calibration.

Mark IV Light Box for Flats

I finally got my Mark IV version of the light box built and operational. Procedurally it works well; ACP can change between two brightness settings to account for the dimmer filters. It is kind of huge (2.5 feet cube) so it takes a lot of room in my small observatory.

Unfortunately, the flats produced are poor. It looks like the Tak can detect lighter/darker zones from the bulbs depending on where the OTA is pointed; I don’t get a nice even flat. Also, I can’t position the box well so the OTA is orthogonal to the lighted panel so I think that also leads to a gradient across the flat (top to bottom).

So, I am back to doing dusk or dawn flats. Tricky doing dusk flats because it is so hot outside (95 degrees at dusk, only going to get hotter here in Arizona) so the camera can’t get cool. I am trying for -10C, but 0 degC may be more in reach. I could water cool the ST2000, I may test that out. The STF8300 does not have water cooling available.