melix / astro4j

Astronomy libraries for Java
Apache License 2.0
27 stars 4 forks source link

Line detection, spectral line following, perpendicular banding, polar caps #360

Closed vnp85 closed 1 month ago

vnp85 commented 1 month ago

Detailed tests with version 2.6.2 dev, issue first observed with 2.6.1 dev.

Context: in Calcium H/K, line detection may fail becasue of the unusually high activity of the Sun, turning a dark absorption line into an emission line, at least regionally -- but those regions are substantial. When line detection fails, as of version 2.6.1 dev, one can try either manually putting markers and thus obtain a polynomial, or choose a happy frame's polynomial to be used globally.

The problem: with both forced polynomials, the image shows unexpected banding and wavelength deviations (often times as "polar caps") no matter the settings.

INTI: running the same ser video (link below) also tested with INTI, which does manage to find right wavelength, and produces the expected image with only minor glitches. Most importantly: no large scale banding and no polar caps.

JSol'Ex: taking the coefficients from INTI, and pasting the crafted JSON into the input field, still fails to produce the expected image.

The ser video: http://narnia.go.ro/seagate2tb.php?mask=2024-07-14

For context, image results with different settings. For reference, an etalon image I took the day before (Lunt):

image

INTI's output, full auto: image

JSol'Ex 2.6.2 dev, full automatic, disk_0_00 png image

JSol'Ex 2.6.2 dev, forced polynomial from happy line, disk_0_00 png image

JSol'Ex 2.6.2 dev, forced polynomial from manually placed markers, increasing markers density towards the disk edge to force the curve accuracy, disk_0_00 png image

JSol'Ex 2.6.2 dev, coefficients taken from inti, the cubic one (missing from INTI) set to zero, disk_0_00 png image

melix commented 1 month ago

I don't think that copying INTI's polynomial values will help, because they can be "reversed" (the polynomial makes sense based on the orientation, which may be different). However I think I understand what's going on. I will keep you posted.

vnp85 commented 1 month ago

Thank you.

Some polar caps are visible also in hydrogen, let me post it.

For the Ca from above, I tried to black box test with each scenario:

I also tried to exclude the possibility of instrument error and/or artefacts, hence also processing with INTI.

And a sanity check against the Sun, just in case (Vega would most certainly show polar caps).

Beta image

Alpha image

melix commented 1 month ago

To be clear there are 2 separate issues at play here:

  1. the polynomial detection. In your case, using a 3rd order polynomial proves more problematic than anything else. I already have tried yesterday something which should improve the situation and provide better results
  2. the flat correction is actually introducing "bands" in your case. Funnily, this algorithm was introduced to fix the banding problems you had in another SER file :/
vnp85 commented 1 month ago

Hm, I read about you adding a flat correction only tangentially, I didn't think much of it as a possible source of problems.

My Sol'Ex setup may be somewhat atypical in that instead of a ND filter I've seen most people use, I have a piglet setup: I use full aperture narrow band filters as ERFs, in a filter drawer in front of the lens, which gives it a snout shape, hence the name. This limits my aperture to 2", but keeping all the light I need, hence even 360 fps is a possibility, with zero gain. And throwing out the rest with at least OD2 or even OD5, depending on the filter quality. I have some Chinese cheapo Na filter that's around OD2-3, but Antlia's Ca-Ha triband ERF is supposed to be good enough. These filters may lead to odd reflections (which I clearly have), on top of the slit's possible unevenness manifesting itself in low contrast situations, such as the Helium line.

vnp85 commented 1 month ago

Thank you @melix , I downloaded the 2.6.3 dev version and it indeed performs better.