melix / astro4j

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

Improve performance of redshift animations/panels creation #332

Closed melix closed 1 month ago

melix commented 1 month ago

By avoiding to recompute autostretched images for each animation.

stefanoaz commented 1 month ago

(Not sure of the correct reply email)

Begin forwarded message:

From: Stephen Rector @.> Subject: Request for batch mode naming convention in jSolEx Date: June 29, 2024 at 14:12:06 MST To: melix/astro4j @.>

Hi Cèdric:

I have used batch mode to create solar images coming from jSolEx, for subsequent stacking in AstroSurface. But I tend to avoid batch mode because the present batch file naming convention leaves the UTC time out of the file names. That makes it difficult to assemble a sequence and know which file was associated with which time. Also, I get files with identical names, if the time string is left out of the name. Am I missing an option that would fix this? Or is this something that you could incorporate into a release? It's only a problem in batch mode.

Thanks,

Steve

melix commented 1 month ago

@stefanoaz I have created #333 . Any reason why you don't use the built-in stacking? Have you noticed significant difference in quality compared to AS!?

stefanoaz commented 1 month ago

Cèdric:

I haven't tried the built-in stacking! I saw mosaics in the menu choices and didn't read further. I'll try it out. But - that said - AS has a deconvolution algorithm I like, and the sharpening tool works well. However, it has the overhead of being a windows-only program running on Crossover (similar to Wine) on my Mac. I will certainly try your stacking - thanks!

steve

On Jun 29, 2024, at 14:27, Cédric Champeau @.***> wrote:

@stefanoaz https://github.com/stefanoaz I have created #333 https://github.com/melix/astro4j/issues/333 . Any reason why you don't use the built-in stacking? Have you noticed significant difference in quality compared to AS!?

— Reply to this email directly, view it on GitHub https://github.com/melix/astro4j/pull/332#issuecomment-2198341955, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4JHEAWKBZEBHYALLU2B53ZJ4RDXAVCNFSM6AAAAABKDPPWP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGM2DCOJVGU. You are receiving this because you were mentioned.

melix commented 1 month ago

JSol'Ex also provides deconvolution ;) Here's an example script I suggest you try in batch mode. It will perform stacking and generate several images, including doppler and eclipse, but you can tweak to your needs. The benefit of using a script is that everything is integrated, you don't have to manually select images, making things very fast. Note the script uses rl_decon which is Richardson-Lucy deconvolution:

dopplerShift=3.1

[outputs]
base=rl_decon(avg(range(-1;1;.5)))
red=rl_decon(img(-dopplerShift))
blue=rl_decon(img(dopplerShift))
cont=continuum()

[[batch]]
stacked=ellipse_fit(stack(base))
stacked_red=ellipse_fit(stack(red))
stacked_blue=ellipse_fit(stack(blue))
stacked_cont=linear_stretch(pow(stack(cont);1.8))
cst=sharpen(asinh_stretch(linear_stretch(pow(stacked;1.8));200;2))
eclipse=asinh_stretch(disk_fill(stacked);200;8)
doppler_base=linear_stretch(saturate(rgb(stacked_red;avg(stacked_red,stacked_blue);stacked_blue);1.1))

[outputs]
continuums=draw_text(draw_obs_details(stacked_cont);2400; 64; "Continuum")
jsolex=draw_obs_details(auto_contrast(stacked;1.5))
compo=draw_obs_details(max(eclipse;cst))
doppler=draw_obs_details(doppler_base)
eclipse_doppler=draw_obs_details(linear_stretch(disk_fill(doppler_base)))