Big Update: Statistical Stretch v1.3 Linear to NonLinear Script - Now with functioning preview!

Sdílet
Vložit
  • čas přidán 9. 05. 2024
  • I am not a coder and this took considerable amount of work for me. I felt it important to get this to the community though. We now have a functioning preview that allows you to see what your end result will be first prior to committing!
    Please share, leave comments and suggestions. I hope you all like the update!!
    You can update PixInsight via Resources - Manage Repositories and add the following URL: raw.githubusercontent.com/set...
    Zip files on my website for standalone downloading.
    www.setiastro.com/pjsr-scripts
  • Věda a technologie

Komentáře • 91

  • @setiv2
    @setiv2  Před měsícem

    Version 1.3.1 Updated.
    -Auto Resize the Preview is clicked by default. You can uncheck it to have the preview zoom in if you need a closer look.
    -New instance icon when you drag it on an image it will now open the dialog instead of executing immediately. If you also double click the icon and click the blue square it will also open the dialog.
    Repository and zip files on my site are now updated

  • @IcedReaver
    @IcedReaver Před měsícem +3

    Wow, that was a quick turnaround on introducing the preview feature! Simply outstanding, can't wait to try it out!

  • @davehamby1593
    @davehamby1593 Před 4 dny

    Outstanding work and much appreciated.

  • @joedenisco6033
    @joedenisco6033 Před měsícem +2

    Wow! This is really nice of you to do. What a time and effort saver. I tried it on a really good M31 stack and the stretch was a little weak. Not much different than the autostretch I saw on my iPad after my 180 sec subs popped up on the screen. I am sure with a preview screen I can find the perfect settings.
    I dont like stretching because Its too complicated for my simple mind to understand. Your script is an amazing tool for the community. Bless you sir!
    Joe D

  • @DrJoeSelfCoaching
    @DrJoeSelfCoaching Před měsícem +2

    This is an amazing addition/update to your statistical stretch. The preview makes this fool proof and user friendly. Just brilliant!

    • @dr.joeluciani1482
      @dr.joeluciani1482 Před měsícem

      I just tried to stretch with v1.3 for the first time; I'm blown away!!! Great job Frank.

  • @braddraper2013
    @braddraper2013 Před 25 dny

    Another Amazing Script Sir ! Thanks for all of your hard work !

  • @carlh2514
    @carlh2514 Před měsícem +1

    Many thanks. Thank you for this excellent script.

  • @rtpman1953
    @rtpman1953 Před měsícem +2

    Outstanding! I'll try the new features on my next Target.

  • @DanHall64
    @DanHall64 Před měsícem +1

    Love your work, my go to stretching tool now.

  • @Agepi7o
    @Agepi7o Před měsícem

    I come back her to thank you again.I don´t know if I'd get better results with GHS but your script is SO, SO, So easy. I don't think I'm going to use anything else to stretch . Thanks again

  • @RigoFromSpain
    @RigoFromSpain Před měsícem +1

    Very well done Frank, great update !!!

  • @danielpetzen
    @danielpetzen Před měsícem +1

    This is such a great script. Thank you!

  • @christopheguigot841
    @christopheguigot841 Před měsícem +1

    Sacré boulot encore…bravo..!.merci.

  • @AlexN-Astro
    @AlexN-Astro Před měsícem +1

    Fantastic work! Can't wait to try it tomorrow

  • @TevisC
    @TevisC Před měsícem +1

    got it to work yesterday by re-downloading Pi. Thanks for the script.

  • @seanmasten8187
    @seanmasten8187 Před měsícem +1

    Useful update to a great script. Keep it up Frank.

  • @ChristianProulx
    @ChristianProulx Před měsícem +2

    Of course, I’ll show your script to the French community, nice job you’ve done.

  • @rickbria8420
    @rickbria8420 Před měsícem

    I tried it, I love it, it has completely changed my image processing routine. Thank you so much for this.

    • @setiv2
      @setiv2  Před měsícem

      Wow! Great to hear!

  • @bobc3144L
    @bobc3144L Před měsícem +1

    Great update. Thank you.

  • @stefanbalzer611
    @stefanbalzer611 Před měsícem +1

    Great Job! Thank’s. It works perfect 👍

  • @matthewkendall5235
    @matthewkendall5235 Před měsícem

    Every month seems to be Christmas lately - from the amazing Gradient remover last month to statistical stretch this month - just wow and thank you for doing this for us all! Rather a powerful, timesaving tool - played with it last night and was impressed! Not sure how to best use number of iterations yet - have to look at that next. Thank you Franklin!

    • @setiv2
      @setiv2  Před měsícem +1

      Thats great to hear!! I am debating on just removing the iterations. That was the math nerd in me wanting an option to iterate it automatically such that the whole thing reaches convergence, in other words running it even moreafter convergence wouldnt actually change anything. Does it make a big difference in the quality of the output? Honestly probably not at all. Does it mean the median would be exactly at your target goal and the black point exactly 3 sigma below the median? Yes lol. I am just excited I was able to script enough to get this out to the community!!

  • @davechaton6771
    @davechaton6771 Před měsícem +1

    Preview is a great addition.....

  • @bobmiller6918
    @bobmiller6918 Před měsícem +1

    Perfect!! Thank you!

  • @sternwarteneumarkti.d.opf.6094

    Thank you very, very much.

  • @alexandervarakin9478
    @alexandervarakin9478 Před měsícem +1

    Statistical Stretch. Very Nice!

  • @terrybertrand7159
    @terrybertrand7159 Před měsícem +1

    Great update!

  • @NevadaDesertSkies
    @NevadaDesertSkies Před měsícem +2

    Nice Script, Frank. I would suggest a "size to fit" button or a zoom feature for the preview window. Maybe down the line as your coding gets even better.

    • @setiv2
      @setiv2  Před měsícem +3

      Omg it took two solid days to work out all the issues to get this thing to display a preview at 25% the original size so you werent stuck at a 1:1 preview. I originally did want a resizable zoom but my god this was all much harder than I anticipated. For sure on my to do list to incorporate some kind of rescaling for the preview.

    • @NevadaDesertSkies
      @NevadaDesertSkies Před měsícem +1

      @setiv2 I'm not a coder so I have no clue what it takes to implement that kind of feature. It was just an obvious suggestion that you already know would improve the usability of the script. Again, great work! I'm looking forward to implementing it on my next processing job.

  • @cedriclejosne101
    @cedriclejosne101 Před měsícem

    Nice job!!

  • @Arcteek
    @Arcteek Před měsícem +1

    Great content thanks

  • @JeffHorne
    @JeffHorne Před měsícem +1

    Great additions! Quick question…does the normalization take place after curves, or before? Thanks, my friend!

    • @setiv2
      @setiv2  Před měsícem

      After the shift in the median. Actually normalization was hardcoded in V1.0, that was that 3rd step to readjust the whitepoint. I thought in this version I would make it user optional

  • @johnhawkes7681
    @johnhawkes7681 Před měsícem +1

    Super update Franklin. Such a great script. There are some great processes and scripts in PI but I find some of them just to long winded to use. This is a great example of how a simple script can get the job done without six dozen iterations. Are you developing hands on or using an iterative approach with ChatGPT?

    • @setiv2
      @setiv2  Před měsícem +1

      ChatGPT is great to work through troubleshooting and easy maintenance code. Had to learn on the fly a ton. Especially since PJSR (pixinsight javascript runtime environment) is super old and missing tons of standard features. So 75% of the time you are just trying different approaches to get it to do what you want. The math behind the stretching itself to me is straight forward. A nice user interface with a preview has been..... let's just say a challenge :)

  • @seafurymike
    @seafurymike Před měsícem

    Thanks for developing this script. I have been using it extensively on my current image. The preview feature makes the process so simple now, kudos for including it. Just of note, the fit to preview drop down, is this meant to fit into the SS preview window or does it reference something else for scale?

    • @setiv2
      @setiv2  Před měsícem

      It scales the image down to fit the width of the preview box (scale factor has to be an integer so it gets it as close as possible)

    • @setiv2
      @setiv2  Před měsícem

      I also sent out an update today v1.3.3 that offers a couple different zoom factors for the preview as well

  • @AmatureAstronomer
    @AmatureAstronomer Před měsícem

    Interesting.

  • @carlh2514
    @carlh2514 Před měsícem

    I think the reason why so many are getting green images is that when linear image is first brought onto PI screen we are used to then doing STF stretch and unlinking if RGB image without thinking, pre Colour calibration.

    • @setiv2
      @setiv2  Před měsícem

      Oh i agree. Someone made a good point about needing an unlinked stretch for comined SHO images. I agree you would need an unlinked stretch then, although I always just stretch them seperately prior to combining.

  • @sternwarteneumarkti.d.opf.6094

    This is a great and helpful script. Thank you very much. I have one question about version 1.5: What does the “Automatic Convergence” function do? I don't see any difference in the result if I check this box or not.

    • @setiv2
      @setiv2  Před měsícem

      The only time it will make a difference is if the normalization shifts the median of the image away from the target, it will then run the stretch again to ensure the images median is at the target median selected by the user. So for almost all images that wont do anything as the analytic solution is very exacting and the normalization doesnt shift anything much at all. Only for those couple cases will you ever see an iteration 2 actually get performed. That is why I removed the slider. It is robust enough 1 iteration is almost always sufficient.

  • @krisn7819
    @krisn7819 Před měsícem

    This is very good, well done. Best to date 1click stretch solution? It looks like.👍 I will not ditch the GHS, which I like too much, but I can see how these can work together. Thank you!

    • @setiv2
      @setiv2  Před měsícem +1

      Thanks! I like GHS too, my goal with this was to use the data in the image itself to do the initial stretch, get you 90% the way there. Then you can use something like GHS to do those artistic contrast tweaks based on what you want to see in the image. GHS can be really clunky for the initial stretch as well. I think the two work perfect hand in hand. Statistical Stretch first then hop right into GHS.

    • @krisn7819
      @krisn7819 Před měsícem

      @@setiv2 Exactly, I found your script does exceptional job at the initial stage especially when applied in areas of high dynamic range (I used a low setting). Then it's just a matter of using GHS to do the more selective work. I think many people will be using it in no time. 👌

  • @emuhead
    @emuhead Před měsícem

    Great work once again. I do have a question, for images with stars, 0-1 makes sense, but for starless images, maybe 0-0.9 would be good.. or wont it matter?

    • @setiv2
      @setiv2  Před měsícem

      Are you referring to the normalization? Images with stars normalization wont do anything as some of the stars will already have 1.0 for a pixel value. And for bright nebula and galaxy cores you dont want to force the ceiling to 0.9 as some portions may be brighter than that after stretching

    • @emuhead
      @emuhead Před měsícem +1

      @@setiv2 Yes, normalisation 👍🏼 I usually don't stretch anything (other than stars) beyond 0.9 so as not to lose detail, as it tends to look too white after that and you can't make out the same structure. Ill just have to try it out & see what works, and either use or 'not use' the normalisation setting for a given use case. Liking the new tools you're putting out btw.

    • @setiv2
      @setiv2  Před měsícem +1

      Yes. Every object is a little different. That is why making a 1 push button tool so difficult. Trying to keep the interface simple and thr math behind it powerful to get you 90% the way there so all you have to do is tweak it. Normalization was hardcoded in V1.0 and i decided to split it out. I bet you have some brighter pixels in your starless images than you realize as well, pull up the Statistics Process and see what the maximim value is.

    • @emuhead
      @emuhead Před měsícem +1

      @@setiv2 Challenge accepted 😉

  • @carlh2514
    @carlh2514 Před měsícem

    I use colour ASI294MCPro camera so RGB from outset. The stretch is always previewed via PI STF, although wanted to try yours before Colour calibration. Now understand that have to do latter first before applying your Script. It would be good if you included similar STF to initially view image.

  • @melvinatkins3443
    @melvinatkins3443 Před měsícem

    Hi, thanks for your wonderful script but what I’m not sure about is, will the image still be linear as if the image had been stretched using stretch screen analysis in Pixinsight?

    • @setiv2
      @setiv2  Před měsícem

      Are you asking if you use the preview windiw then decide to exit out of the script without hitting execute? The image will still be linear. As soon as you hit execute it stretches the image and is now non-linear

  • @mikei.6294
    @mikei.6294 Před měsícem

    Just tried the script and it works well, so I wanted to add it to my personal icon set. However, unlike other processes and scripts, it gives an error message and the script won't open from the saved icon's script parameters window without a "target view" value. That value, of course is the image file to apply the script to after the script opens.

    • @setiv2
      @setiv2  Před měsícem

      The script cant be run in a global context. You can save the script, if you double click it you can change any parameters in the dialog then you drag and drop the blue triangle on the new image. If you want the full dialog open again you need to open it via the scripts -> utilities. That is a coding choice btw. If everyone wants it to be clicking the blue square or deagging the icon to a new image opens the dialog instead i can make that change. That may make more sense now that I have incorporated the preview

    • @mikei.6294
      @mikei.6294 Před měsícem

      @@setiv2 Thanks for the quick reply. l like your idea of being able to drag the script icon to an image so that it opens the script's dialog box, giving us access to the new preview feature without having to go through scripts -> utilities. I use custom icons not only for quicker access, but to preserve notes on usage for each of my process or scripts..
      Mike

    • @setiv2
      @setiv2  Před měsícem

      @@mikei.6294 i just started a poll to see what everyone wants. Be sure to cast your vote and leave a comment!

  • @ronaldcunningham2723
    @ronaldcunningham2723 Před měsícem

    I was unable to get the script into Pixinsight. I downloaded manually but not sure where to place the script in the pixinsight sub folders. Any help would be appreciated.

    • @setiv2
      @setiv2  Před měsícem

      If you havent upgraded to PixInsight build 1605 (which came out in March) I highly recommend you do that as all scripts are going to require signatures going forward. You do this from the PixInsight download site. This will fix the error if you are trying to use the repository.
      If you still run into a parsing error or signature error you can download the zip file directly from my website and then just extract the .js file (delete the .xsgn file). You can then go to Scripts -> Feature Scripts -> Add Script and select the folder you extracted the .js file too.
      Let me know if this helps
      Frank

  • @carlh2514
    @carlh2514 Před měsícem

    When I run it gives green image. How do I unlink? The video appeared to cover this but did not?

    • @setiv2
      @setiv2  Před měsícem

      No it says the stretch preserves colorbalance, you need to run spcc or color calibration first prior to stretching

  • @nopmop4248
    @nopmop4248 Před měsícem

    Hi, your script looks amazing. Would love to try it but sadly your repository gives me just an error message in Pixinsight: "Parsing repository update information: Parsing Signature element (line=1 offset=0): Unknown code signing identity". Tried just running the script but I cant run it manualy.

    • @setiv2
      @setiv2  Před měsícem +1

      If you havent upgraded to PixInsight build 1605 (which came out in March) I highly recommend you do that as all scripts are going to require signatures going forward. You do this from the PixInsight download site.
      If you still run into a parsing error or signature error you can download the zip file directly from my website and then just extract the .js file. You can then go to Scripts -> Feature Scripts -> Add Script and select the folder you extracted the .js file too.
      Let me know if this helps
      Frank

    • @nopmop4248
      @nopmop4248 Před měsícem

      @@setiv2 Thank you very much! I didnt know I was sill running an older version. Update fixed the problem. Cant wait to try out the script :)

  • @vmeighan
    @vmeighan Před měsícem

    can you verify the repository URL? can't get it to work. I downloaded the zip file and that worked fine. looks like an excellent alternative to GHS. can't wait to try it.

    • @setiv2
      @setiv2  Před měsícem

      You need to upgrade to PixInsight build 1605 (that came out in March) if you want the repository to work. You get that from the PixInsight download site. Hope this helps!

  • @Crozb07
    @Crozb07 Před měsícem

    Also getting the code signing error "Parsing Signature element (line=1 offset=0): Unknown code signing identity 'FranklinMarek'". I would like to add the repo rather than add the scripts manually.

    • @setiv2
      @setiv2  Před měsícem

      You will need to update to PixInsight build 1605 (which came out in March). You do this from the PixInsight download site.
      Let me know if this helps
      Frank

    • @Crozb07
      @Crozb07 Před měsícem

      @@setiv2 I did this week ago

    • @Crozb07
      @Crozb07 Před měsícem

      Sorry I was reading version wrong. I'm at 1601. I will update.

    • @setiv2
      @setiv2  Před měsícem

      Yeah 1605 is the latest one that is requiring all the digital signatures

  • @emuhead
    @emuhead Před měsícem

    Pixinsight giving a missing signature error when adding repository. Would you know a workaround for this?

    • @setiv2
      @setiv2  Před měsícem +1

      You will need to update to Build 1605 (it came out in March) for the repository to work. You can get it from the PixInsight download page. Otherwise if you get the zip file from my site delete the .xsgn file in the zip folder extract the .js and go Scripts -> Feature Scripts -> Add scripts

    • @emuhead
      @emuhead Před měsícem

      @@setiv2 Thanks for such a quick response, and it worked well. Your Statistical Stretch script is now my stretch method of choice. Do you know what's under the hood of the regular STF stretch & as such, why Statistical Stretch works so well in comparison?

    • @setiv2
      @setiv2  Před měsícem +1

      @@emuhead Yes. I actually cover what STF is doing in this video czcams.com/video/lo1SssohJgc/video.html

  • @rbarberac
    @rbarberac Před měsícem

    Ouch v1.3.3 is a big step backward. I'm unable to retrieve the same kind of stretching that I was obtaining with v1.3.2 and below. Very difficult to retrieve low level tidal streams that where evident with previous versions

    • @setiv2
      @setiv2  Před měsícem

      Iteresting. 1.3.3 didnt change any stretching algorithm. It just defaulted the dropdown and added zoom levels for the preview. The algorithm had been the same since 1.2

    • @setiv2
      @setiv2  Před měsícem

      You can email me and we can run some tests we older versions. They should produce the same exact stretch as the pixelmath formulas didnt change.

    • @rbarberac
      @rbarberac Před měsícem

      @@setiv2 Sure, I'll do... it's really strange

    • @rbarberac
      @rbarberac Před měsícem +1

      As expected, after you provide the v1.3.2 I was UNABLE to reproduce my previous results, so we can mark this as an "user error", because v1.3.3 doesn't introduces ANY regression (as I've suspected). Thanks for your help!

  • @alejandrohuerta988
    @alejandrohuerta988 Před měsícem

    I'd say you're well on your way to being a "coder."

    • @setiv2
      @setiv2  Před měsícem

      Ha! I am sure if anyone that really knows what they are doing looks at my script they will say "why did you do it like that? You did it all wrong!"