Auto adjusting for sky flats

I’ll send some logs on my next run in a couple of nights, as I have a few more OIII frames + G, B and L to do

@mikaelA

I have a feature request for you, the ability to specify a number of frames per filter rather than a global one. For example tonight I need 5xG, 36xB and 26xL, as I am only able to capture a number of frames per night.

What happens at the end of the flats capture, does it just sit there as completed?

@mikaelA

I found a problem, the sky flats are taken at Gain 0, even though in SGPro the default Gain for my camera is Gain 100, so now I know why my flats are not working properly with the master dark flats

@STAstro Indeed, Skyflats do not control the gain at this point (I’m using a CCD). I will need to add this for sure. Should the gain be filter-dependent, as you proposed for the frame number ? I’ll probably need you to beta test it when I have a first version, since I dont own a CMOS camera.

But I am a bit confused if SGP has always allowed control of the gain through the API call. @Ken has the gain control always been there and I just didnt notice it before ? Is it also there in SGP 3.2 ?

@mikaelA

Not sure why the skyflats is over-riding the default, in any sequence of the value of gain is not set, it uses the default the camera has been set at in the control panel as you can see below:

If you have a sequence where the gain is “Not Set” like the below, it will use the applied default setting
image

@STAstro The API only provides a very limited control of SGP, basic stuff like change filter, change focuser position, make an exposure. There is no higher-level control like reading/changing control panel parameters, nor controlling the sequencer. To take a flat Skyflats simply uses the API call SgCaptureImage (http://localhost:59590/json/metadata?op=SgCaptureImage).

Now Skyflats doesnt set the gain when it makes the API call SgCaptureImage, then it is up to SGP how to handle that situation. Maybe it would be logical for SGP to revert then to the default setting, now it looks like it sets gain to 0. We’ll need @Ken to comment on this.

Still, it makes sense to include gain control into the Skyflats app. I’ll put it on the list for the next version, which I hope to release sometime in August. There are a few other things to fix/add as well.

Looking at the API documentation there should be a way to set the GAIN

public class SgImage

{

    public int BinningMode { get; set; }

    public int IsoMode { get; set; }

    public int ExposureLength { get; set; }

    public string Gain { get; set; }

    public string Speed { get; set; }

    public string FrameType { get; set; }

    public string Path { get; set; }

}

In that case then I cannot use Sky-Flats until it supports gain control, as my light frames are all at Gain 100, so using flats/dark flats at Gain 0 will not work.

Pity as the whole process is great

The whole process of taking automated dusk or dawn flats is not as easy as it seems. In the past, I often used CCDCommander which has this function implemented together with Maxim DL. It worked best with my former Atik 460 camera which had reasonably short download times. With my QSI 583, it is already more difficult to run through all filters because of the slow download times (approx. 15 s).
The opposite is true for the modern CMOS cameras, where the download times can be too short. It could be an issue of the frame buffer in my ASI 1600MM or something else, but it seems that the ADU calculation time does not comply with the download frequency. As a result, I get oscillating mean ADU values of the flats, underexposed and overexposed ones alternating. There could be a solution to aply a one or two second pause between the images but I haven’t tried that.
To be clear, all this applies to CCDC, not to the new tool by mikaelA, but perhaps this hint might be helpful.

Juergen

Thanks Juergen for your insights. As it happens I developed the app with my Atik 460 ex, and as you said it works really well. Im motivated to try to figure out a more sophisticated algorithm to handle cameras with long download times.

@joelshort Could you please provide me with some typical Skyflats logs where you see the issues you mentioned?

Mikael

Here’s a log from back in May.
skyflatssgp-log-2022-05-26 20-57-19.txt (12.1 KB)