LandingEllipse / SLDTk

Repository for the Solar Limb Darkening Toolkit
MIT License
2 stars 1 forks source link

Find a way to compensate for sunspots when generating the limb profile #4

Closed LandingEllipse closed 7 years ago

LandingEllipse commented 7 years ago

The radial slices taken from the solar disk may include sunspots. We need a method that detects radial slices that have intersect sunspots and discards them from the dataset before the profile is computed.

LandingEllipse commented 7 years ago

Basic idea: walk through every slice. If value dips below threshold, take note. If value subsequently returns to above threshold, identify as sunspot and discard slice. If value remains below threshold until end of slice this is just an indication that we've reached the end, hence the need for a distinction.

Alternative would be to crop slices to within disk by some margin and check for any slices with below-threshold pixels present. Pitfall: what about sunspots close to the limb/radius?

In either case: What about sunspots actually on the limb? Should possibly in any case remove highest and lowest slices indicated by their 1st axis mean?

LandingEllipse commented 7 years ago

A less manual option would be to use an edge detection algorithm from e.g. cv2. If used, however, we should test thoroughly to check that the chosen technique is not overly sensitive to absolute slice size (like Canny turned out to be with disk detection).

LandingEllipse commented 7 years ago

For now, an outlier rejection algorithm has been employed which works on the average of each slice in the stack. This is less than optimal as it's not great for detecting sunspots near the limb, and it leaves quite a bit of penumbra behind in many cases, but it will for for now.

The gradient traversal idea should still be revisited in the future.