Author Topic: MaskedStrechTransform  (Read 12263 times)

Offline José Manuel Pérez Redondo

  • Newcomer
  • Posts: 18
    • View Profile
Re: MaskedStrechTransform
« Reply #15 on: 2010 February 23 11:03:42 »
Ok Dave

There's my MST of M42. The parameters are in the same window.

Left is before. Right is after.

I like this script!!

Offline caliu

  • PixInsight Addict
  • ***
  • Posts: 210
    • View Profile
    • http://www.caliu.fotografiaastronomica.com
Re: MaskedStrechTransform
« Reply #16 on: 2010 February 23 11:26:41 »
Hi Dave,

Its been in PI for...well at least hundreds of years (well a couple anyway). It takes an unstretched image, then does a whole series of small incremental stretches whilst protecting the star edges at each stage. The aim is to try and minimise the star bloating that you can get if you do a large histgram stretch all in one go.

At least that's what i think it does....but someone may be able to give more details.

I tried it hundreds of years ago and compared it with a single full stretch....and to be honest I couldn't tell any difference. Maybe I was doing something wrong. I like the concept, so I would be interested if others have actually found it makes a difference....i.e. they have done a direct comparison between using it and using a normal stretch.

Cheers
         Simon

Hi Simon, since much time using PI, I do not find the difference either....¡oh yes!, the sigle full stretch he is much more fast  ;)

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: MaskedStrechTransform
« Reply #17 on: 2010 February 23 11:44:40 »
Hi Jmpr (sorry...I don't know your real name!),

What we need to see is the same image stretched using the normal histogram method to the same extent....and then see both stretched images side by side.....one being the MaskedStretchedTransform method and one being the normal Histogram method. It would be best if both images were zoomed in on a few stars of different sizes. That would be an interesting comparison.

Cheers
         Simon

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 925
    • View Profile
Re: MaskedStrechTransform
« Reply #18 on: 2010 February 23 11:57:26 »
This is an example. The left image is stretched using MaskedStretch, while the right one is stretched using an equivalent HistogramTransform.

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
    • View Profile
Re: MaskedStrechTransform
« Reply #19 on: 2010 February 23 12:20:07 »
I'm a relatively new PI user trying to learn the ropes. This thread introduced me to the Masked Stretch script. Went to try it and am having a problem. Using parameters suggested by JMPR the script seems to be running but after a couple minutes nothing has happened. Then nothing in PI works so figuring PI is "not responding" I manually try to close the program. Before PI closes get the following message:

"One or more views are currently locked.
Terminating the core application with locked views is a risky situation that denotes incorrect behavior of one or more installed modules. Perhaps you may want to fix the locked state(s) manually, if possible.
Exit anyway?"


Can someone tell me what's going on? What's locked? How do you "fix the locked state"? Obviously I'm doing something wrong. Help appreciated.

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: MaskedStrechTransform
« Reply #20 on: 2010 February 23 12:46:39 »
Steve...I can't help your problem...but hopefully one of the 'gurus' will be along shortly to help you.

Andres....that actually looks like it has made a difference. It looks like the fainter stars have been left untouched, whereas the brighter stars have been somewhat contained. Good result....maybe I shall try it again.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7018
    • View Profile
    • http://pixinsight.com/
Re: MaskedStrechTransform
« Reply #21 on: 2010 February 23 13:47:19 »
Quote
One or more views are currently locked.

A view (read: image or preview) is locked by a process before it begins working with its pixel data. Locked states prevent other processes (including the core application) from accessing the same view concurrently. When the process terminates, it must unlock all views that it previously locked.

This warning tells you that a view is still locked when you attempt to exit the core application. This is an abnormal situation because it denotes that something is happening "behind the scenes" with an image, and you are about to terminate it in an uncontrolled way. The warning message is shown by PixInsight's self-diagnostics routines.

There are basically three causes for this error:

(i) The Real-Time Preview is still generating a preview image when you select File > Exit. This may happen sometimes with slow processes, but is unlikely to occur in practice.

(ii) A process is still running. Note that this is very unlikely to happen with a normal process because you are not allowed to exit PixInsight while a process is running. However, a script like MaskedStretchTransform can work without blocking the graphical interface, so you can select File > Exit while the script is still running.

(iii) A process has finished its operation, but has "forgotten" to unlock a view. This is a bug. It is not dangerous, although it should never happen. No standard process in PixInsight has this bug, AFAIK.

I'll take a look at MaskedStretchTransform to see if I can prevent this problem. However, if it happens again, all you have to do is waiting until MST terminates, or trying to abort MST operation. Or you can simply exit PixInsight, if necessary, as you won't break anything important (all images generated by MST are temporary ones so losing them doesn't hurt).
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
    • View Profile
Re: MaskedStrechTransform
« Reply #22 on: 2010 February 23 14:18:05 »
Thanks for the clarification, Juan.

It appears that others are able to get results with this script so I'm wondering way it apparently isn't running correctly on my computer. Running Win 7 64bit. Perhaps I'm not waiting long enough for the script to finish. How long should it take to do 200 iterations?

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
    • View Profile
Re: MaskedStrechTransform
« Reply #23 on: 2010 February 23 15:25:45 »
Hi Steve,

I have no experience using this script - but what about trying to run it on a very small (say 100x100) image, like a Preview copied out to become a 'new image', or a Dynamic Crop of a bigger image.

Also, whilst you run the PJSR, have a look at the Windows Task Manager - and try to see if 'Memory' is running away.

Just some suggestions.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline dhalliday

  • PixInsight Old Hand
  • ****
  • Posts: 307
    • View Profile
    • on Flickr
Re: MaskedStrechTransform
« Reply #24 on: 2010 February 23 17:23:02 »
OK...I found it (in "scripts"...what the heck is that...a spare closet..?...I will have to "root around" in there and see what else is hidden away..)
I LIKE it..!!
Its "Histo stretch" for dummies...
Sort of like watching a metamorphosis-speeded up.. >:D

But what about all the "options"...????????
I am going to play with it and see...presumably it can do the work better than a mere human...No ??
Thanks for bringing another tool to light !!
What else is "stashed away" in there..??

Dave
Dave Halliday
8" Newtonian/Vixen VC200L/ TV 101,etc etc
SSAG/EQ6
CGE Pro
SBIG ST2K,ST10XME

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
    • View Profile
Re: MaskedStrechTransform
« Reply #25 on: 2010 February 23 17:33:38 »
Hi Dave,

Yep - PJSR 'Scripts' - that's where we, the users, get to implement all of OUR clever little ideas, some of which Juan will take and implement into the next public release of PixInsight.

And the great thing is that, although it IS 'programming', it isn't 'difficult' programming - not like the 'core' of PI. And, because the scripts, by their very nature' are 'open source', anyone with the inclination can 'tweak them' and offer the improvements back to the PI community.

It is just one of the ways that keeps PixInsight 'alive'.

If you want to try another script - have a look at the <Preview Aggregator> script, which will take a selection of image previews, and will then build a new image from these. And this is what Harry uses in his recent videos (including, if I remember correctly, his work on your data). It is one of the very clever ways of getting EXCELLENT background neutralisation, and essential step to good colour balance.

Keep having fun!

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline dhalliday

  • PixInsight Old Hand
  • ****
  • Posts: 307
    • View Profile
    • on Flickr
Re: MaskedStrechTransform
« Reply #26 on: 2010 February 23 17:48:29 »
Niall
You little Pixinsight brown noser you...!
Here is a look at M1...with the MSTF applied...(plus the other stuff...)

http://www.flickr.com/photos/daveh56/4383031801/

It definitely does a better job than me...!!!!!!!!!
So where are all these "scripts" stashed..?
"Pixinsite Script Vault"...?
Lets see where you are at with YOUR M1.....?!?!?!?!
It will be interesting to play with/learn how to use this MSTF more...

Dave
Dave Halliday
8" Newtonian/Vixen VC200L/ TV 101,etc etc
SSAG/EQ6
CGE Pro
SBIG ST2K,ST10XME

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
    • View Profile
Re: MaskedStrechTransform
« Reply #27 on: 2010 February 24 09:22:27 »
Thanks for the suggestions, Naill.

Turns out all is well with the script, just another case of operator meltdown. ;D Incorrect script settings led to apparent improper script function.

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline José Manuel Pérez Redondo

  • Newcomer
  • Posts: 18
    • View Profile
Re: MaskedStrechTransform
« Reply #28 on: 2010 February 28 04:59:54 »
Hi Jmpr (sorry...I don't know your real name!),

What we need to see is the same image stretched using the normal histogram method to the same extent....and then see both stretched images side by side.....one being the MaskedStretchedTransform method and one being the normal Histogram method. It would be best if both images were zoomed in on a few stars of different sizes. That would be an interesting comparison.

Cheers
         Simon

Sorry Simon

I'm José Manuel and I don't understand the question.  :'(  I have just changed my profile.

My English is very bad. I will study!

Thanks the others posts!! They are fantastic information

José Manuel

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: MaskedStrechTransform
« Reply #29 on: 2010 February 28 05:18:03 »
Hi Jose,

No problem. Your English is superb....my Spanish is about ten words only!  :(  Thank heavens for Google Translate.

Andres Pozo has answered my question above. His images compare the same image stretched using just Histogram with the image stretched to the same extent using MaskedStretchedTransform. It shows that the MaskedStretchedTransform does actually give a better result.....which is good!  ;)

Cheers
         Simon