sunpy / sunkit-image

A image processing toolbox for Solar Physics
https://docs.sunpy.org/projects/sunkit-image/en/stable/
BSD 2-Clause "Simplified" License
33 stars 45 forks source link

STARA Sunspot detection #37

Closed Cadair closed 1 week ago

Cadair commented 4 years ago

Been speaking to @fraserwatson about reimplementing this code in Python, for a quick overview see http://hmi.stanford.edu/hminuggets/?p=981

More links to follow as we extract them.

fraserwatson commented 4 years ago

Agreed, the methodology I used is in pages 19-45 of http://theses.gla.ac.uk/3429/1/2012watsonphd.pdf. I have been threatening to rewrite it all in Python in the years since...

abhijeetmanhas commented 4 years ago

I want to work on this issue. I went through the thesis pages mentioned, it contains some formulas relating magnetic field strength and magnetic pressure, and states

sunspots will not form unless the local magnetic field strength is greater than around 1500 Gauss

I can model all mentioned equation in python.

But I need help to get started with it, like which file or class need to have these functions and what exactly have to be done. Do we have to give results like this will be probability of sunspot given these conditions or use algorithm to tell whether they are present there or not.

nabobalis commented 4 years ago

In terms of what files or classes, there is no current place for those equations so just create a new file and write whatever functions and classes you need. We can move them around latter.

What needs implementing I hope that @fraserwatson can expand upon.

Cadair commented 4 years ago

I have a reasonably complete implementation of this algorithm here: https://github.com/Cadair/sunspot_experiments/blob/master/stara.py

I believe @wtbarnes is doing some large scale tests of it on HMI data. It would be a great first contribution to get it cleaned up and incorporated in here.

alegrand commented 3 years ago

Hi,

Is there any news on this topic ? I would be interested in using this code for a lecture on reproducible research with some colleagues. @fraserwatson, is the original matlab code available somewhere ? @Cadair 's code looks super simple as it builds on a huge set of libraries but it's difficult for me to know how faithful to the original STARA algorithm it is. Last, did @wtbarnes finally test it on HMI data ? Thanks for your help.

nabobalis commented 3 years ago

As far as I am aware, there has been no news or progress on this.

wtbarnes commented 3 years ago

I actually did apply this to the HMI catalogue (sampled at 1 day) using @Cadair's implementation in this notebook: https://gitlab.com/wtbarnes/aia-on-pleiades/-/blob/master/notebooks/tidy/finding_sunspots.ipynb. There is a lot of other stuff going on there, but you may find it useful. As to how it compares to the original implementation, I am not sure.

fraserwatson commented 3 years ago

I do have the original Matlab code that I can give you if you want to look through it. And I can also confirm that the implementation we put into sunkit-image copies the algorithm exactly.

nabobalis commented 3 years ago

Did I forget that we added this to sunkit-image?

fraserwatson commented 3 years ago

No, could be that it never got added.

alegrand commented 3 years ago

Thanks a lot to all of you for your feedback. I'll carefully check the notebook from @wtbarnes that looks very similar to everything I had in mind for the lecture!

manta103g commented 1 year ago

Dear @fraserwatson, Dear All,

let me know what is a chance to get some and selected images of solar disc from @NASA, analysed by STARA Sunspot Detection application and algorithm, to get to know your definition of a single sunspot or a single group of sunspots against visual inspection of the same images of solar disk by a human.

thank you

darius

manta103g commented 1 year ago

Dear @fraserwatson, Dear All,

let me know what is a chance to get some and selected images of solar disc from @NASA, analysed by STARA Sunspot Detection application and algorithm, to get to know your definition of a single sunspot or a single group of sunspots against visual inspection of the same images of solar disk by a human.

thank you

darius

Deus1704 commented 1 week ago

With the successful merge of the #195, I believe this issue can be marked as completed