Author Topic: StarReduction and LargeScaleStructureEnhance Scripts  (Read 14197 times)

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
StarReduction and LargeScaleStructureEnhance Scripts
« on: 2015 January 18 03:15:41 »
Desperation forced me to get into the world script writing (thought I had given up programing when I retired!!) and I have come up with two scripts which I now use on a regular basis, they can be down loaded from the URL below:

   http://www.qdigital-astro.com/pixinsightscripts

The two scripts are:
   StarReduction
   LargeScaleStructureEnhance

I am just doing the instruction/information sheets at the moment so these will a few days before they are finished.

Both scripts are designed to work on monochrome images although I have tested them on RGB images and they do give acceptable results, however, they are both intended to be used within the normal PI workflow after Dynamic Crop, DBE and initial stretching with HT, but before combining into RGB.


StarReduction
Does exactly what it says on the tin, it reduces the size of stars. The script can be run more than once to reduce the star size still further. It also has facilities to measure the mean FWHM and slightly sharpen the stars after reduction.

LargeScaleStructureEnhance
This script will enhance faint large structures such as Integrated Flux Nebulae (IFN) which are very close to the noise floor and is based upon the workflow as developed by Rogelio Bernal Andreo and fully described in the article (page 97) in Robert Gendler's book Lessons From The Masters.

From a technical standpoint, and being very pedantic,  just removing the stars from an image using Straton is not the same as actually splitting an image into its Large and Small Scale Structures. I therefore decided not to go the Straton route but to adopt Rogelio workflow as being a more correct approach. I may develop a Straton look-alike script but have not yet decided.

Default Operation
With the check boxes set to their default settings (Extract Large and Small scale checked, all others un-checked) the script will split the image into its Large (LSView) and Small (SSView) Scale structures and these become available for further processing.  Rogelio recommends a slight HT stretch on the SSView and a more aggressive stretch on the LSView.

Re-combine the two images by using PixelMath with the expression LSView + SSView after they have been processed and re-stretch the final image, you can use Auto Stretch or STF to give you a rough idea of how much stretch it needs.

You will find that the LSView just doesn't look right and is blurred, this is quite normal as you are seeing an image that has no small strucuture detail.

Optional Operation
Optionally you can let the script do the stretching of the LSView and SSView and then combine the two images into a final image, the LSView being stretched more aggressively than SSView. Complete the process by re-stretching this final image, you can use Auto Stretch or STF to give you a rough idea of how much stretch it needs. There is a choice of streching either view, both views or neither prior to creating the final image, this produces perfectly acceptable results, however, it is better to have direct control on the amount of stretching of the Large and Small scale views, and possibly perform other operations on them before re-combining using the Default Operation described above.

Examples
Master Ha image Dynamically Cropped, DBE and stretched with HT


[image Grayscale_Non_Linear.jpg]


Master Ha image after processing with LargeScaleStructureEnhance and one application of StarReduction.


[image Grayscale_Non_Linear_LSE_SR.jpg]

If you try either of these scripts I would appreciate some feedback and let me know of any problems or enhancements.

Regards,
   Dave
Dave

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #1 on: 2015 January 18 08:31:13 »
Hi Dave!
Thanks, just tried the StarReduction Script on a linear image, which i just captured around -79 Dec with iTelescope.
The script reduces the stars very nice without influencing the whispy molecular clouds!
An excellent tool and Thanks again,  it reduces a lot of manual steps!!!

Gerald

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #2 on: 2015 January 18 09:03:17 »
Thanks Gerald, I am glad it works all OK for you, I used to used Noel Carboni's PS Actions to do star reduction but wanted something that fitted into the PI workflow.

I see that you like images with lots of dusty stuff in them.

Dave
Dave

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #3 on: 2015 January 18 13:12:17 »
Hi Dave

Glad you have let these script out in the wild , really helpful  :D

Harry
Harry Page

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #4 on: 2015 January 23 17:10:13 »
Hi Dave!
Using your StarReduction i experienced a loss of all Keywords in the FITS Header.
It would be great if in the new image created will have all FITS Header Information copied from the
original Image.
Beside that a great tool.

Gerald

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 199
    • Sonoran Dark Skies
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #5 on: 2015 January 24 08:01:59 »
I tried the StarReduction script and notice a little loss of sharpness in the image of a nebula.  I should add that I used the default settings.

Larry
« Last Edit: 2015 January 24 08:09:34 by llpastro »
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #6 on: 2015 January 26 09:17:55 »
Hi Dave,

Thank you very much for your new scripts. Only one thing to note. The multiscale processing workflow you implement was not developed by Rogelio, but by me; the only problem is that he does not make any citation in his article. There was an article on multiscale processing at pixinsight.com long time ago. I published it nearly 10 years ago when PixInsight was still not being developed in Qt. Although we removed it because it's outdated, you can read it here:

http://www.astro-imaging.com/Tutorial/PixInsight/M33/en.html

If you take a look to the figures, you'll see that the graphical interface and the tool design is radically different from the actual state of the PixInsight Platform. Rogelio's article is a simplification of mine's; moreover, both articles are outdated, specially considering that my article was written before designing HDRMT. In ten years the techniques I use for my photos have been heavily developed.


Thanks again,
Vicent.

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #7 on: 2015 January 26 10:39:35 »
Hi Vicent,

LOL.........Its funny how things get all twisted up and out of kilter!!!
I will, of course, amend the credits accordingly, and yes there wasn't any credits to you in the article in Roberts Gendler's book.

However in light of this I feel version 2 coming on...maybe. I was aware of the tutorial http://www.astro-imaging.com/Tutorial/PixInsight/M33/en.html but as you can appreciate it would be more difficult to implement this as a script.

I am on your PixInsight workshop in Alicante next week so maybe I could run a couple of ideas past you?

Again, sorry for the incorrect credits.

Regards,
   Dave
Dave

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #8 on: 2015 January 26 10:49:43 »
Vicent's original tutorial is still available on our website:

http://pixinsight.com/oldsite/tutorials/M33-vperis/en.html

The original document was first published online in 2006.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #9 on: 2015 January 26 11:09:06 »
Vicent's original tutorial is still available on our website:

http://pixinsight.com/oldsite/tutorials/M33-vperis/en.html

The original document was first published online in 2006.


Sorry, didn't remember this! :-P

V.

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #10 on: 2015 January 26 11:18:28 »
Hi Vicent,

LOL.........Its funny how things get all twisted up and out of kilter!!!
I will, of course, amend the credits accordingly, and yes there wasn't any credits to you in the article in Roberts Gendler's book.

However in light of this I feel version 2 coming on...maybe. I was aware of the tutorial http://www.astro-imaging.com/Tutorial/PixInsight/M33/en.html but as you can appreciate it would be more difficult to implement this as a script.

I am on your PixInsight workshop in Alicante next week so maybe I could run a couple of ideas past you?

Again, sorry for the incorrect credits.

Regards,
   Dave

Thanks again. Sure, I'm open to any new idea.


Best regards,
Vicent.

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #11 on: 2015 January 27 12:29:18 »
Sorry Larry and Gerald not answering sooner.

Gerald, will change this in the next version so it copies the FITS keywords.

Larry, the problem is that if the mask is not correct then it will process some of the background, try increasing the threshold and/or decreasing the smoothness. In the next version I will (optionally) make the mask available so you can see exactly what is happening.

Just a note on LargeScaleStructureEnhance, it is not actually based on the article as noted above but uses the more modern MultiscaleMedianTransform approach to generate the large scale structure, this is not used in the noted article

Dave
Dave

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #12 on: 2015 January 27 15:27:59 »
Just a note on LargeScaleStructureEnhance, it is not actually based on the article as noted above but uses the more modern MultiscaleMedianTransform approach to generate the large scale structure, this is not used in the noted article

Dave

This is a better approach indeed, as MMT isolates much better the stars from the large scales. At the time of write the M33 article MMT was still not implemented.


Best regards,
Vicent.

Offline Dimitris Platis

  • PixInsight Addict
  • ***
  • Posts: 181
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #13 on: 2015 August 25 01:30:01 »
I tried the Star Reduction script and it works great.....
However, I have noticed some tiny bug.....sometimes it rests presenting me with an image of the mask asking me whether I wish to keep the image and other times it just bypasses this step completely and discards the mask and continues....
Whats the deal with that?

Offline H.Geske

  • Newcomer
  • Posts: 4
Re: StarReduction and LargeScaleStructureEnhance Scripts
« Reply #14 on: 2017 February 12 08:55:55 »
I have an issue with the StarReduction script.

After the first use, i was not satisfied with te result from the standart settings.
So i did a second try with a change in "detection sensitivity" only.
The result was diffrent, but too much, so i tried a new run with the half of the Setting.
But from now on it is irrelevant what changes i do, the result is always the same.

I have restarted PixInsight and also restarted the Computer. But the script is not reacting on any Change, i do anymore.

I hope iam just doing something wrong and anyone can help me to get the script run properly.

Heiko