sunpy / sunkit-image

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

Figure out what from sunpy core can be moved here #5

Open nabobalis opened 6 years ago

nabobalis commented 6 years ago

The SunPy core module has features and code that does not belong there. For example code from here.

The question is, what should be moved and what should the scope of this package.

wafels commented 6 years ago

Hmmm. I think we need some kind of guidelines to make these decisions. What is the relationship between sunpy-core and sunkit-image? If sunpy-core is purely focused on data acquisition and nice objects to hold those data, then all manipulations of the basic image data should go in sunkit-image.

But you could also make the case that sunpy-core should have some basic image manipulation functionality just for ease of use from the user's perspective. But use with caution - for example, the existing image manipulation functionality does make assumptions; for example,

to_norm *assumes that every element in the array is not a NaN or an inf. That's probably ok most of the time since not all images have NaNs or infs. And for many cases, sunpy's existing interpolation functionality in rescale.py is probably OK.

If a user wants something more sophisticated then that should be provided in sunkit-image, either as code or advice. For example, image resampling is a well-studied topic, and some advice on what packages to look at would be useful.

So, maybe sunpy-core should provide some basic functionality, but more sophisticated transformations that are driven by science goals should be in sunkit-image?

Anyway, back to the code...

coalignment.py - this code could probably all get moved out. Co-alignment depends on the method used to assess similarity of images, and there are many of those. None of the existing sunpy data objects rely on coalignment.py

rescale.py - this is basically the standard method sunpy provides for resampling maps. Stay.

util.py - the to_norm and un_norm functions are used in the differential rotation image warping code. Stay.

transform.py - used in mapbase. Stay.

Could also move this out

https://github.com/sunpy/sunpy/blob/master/sunpy/physics/solar_rotation.py https://github.com/sunpy/sunpy/blob/master/sunpy/physics/solar_rotation.py

since this makes an assumption that differential solar rotation is not required to generate adequate results.

wtbarnes commented 3 years ago

Related to sunpy/sunpy#5425

lavi20 commented 7 months ago

i want to work on this issue and i start to work on it

nabobalis commented 7 months ago

Hi @lavi20, I can't stop you but I think it will be very difficult for someone who is new to work out what needs to be moved without any context. But happy to see what you come up with.

lavi20 commented 7 months ago

@nabobalis i will try my best

Deus1704 commented 6 months ago

So, maybe sunpy-core should provide some basic functionality, but more sophisticated transformations that are driven by science goals should be in sunkit-image

Based on this guideline, I believe that majority of the image processing methods present in sunpy core are already shifted to sunkit-image except few such as rescale.py and transform.py which are necessary for the sunpy to function.

There are few image visualisation methods present in sunpy/visualisation (for example drawing.py that draws solar limb, equator and prime meridian) that deal with data manipulation and are used rarely in the sunpy/map/mapbase.py I'm curious if there are plans to incorporate visualization methods into sunkit-image, or will it solely focus on image processing techniques?

nabobalis commented 6 months ago

I'm curious if there are plans to incorporate visualization methods into sunkit-image, or will it solely focus on image processing techniques?

We haven't discussed it but I would personally lean to no.