Author Topic: New Global Action: STF AutoStretch  (Read 14025 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
New Global Action: STF AutoStretch
« on: 2011 September 29 12:58:58 »
Hi all,

Today we have released an update to the IntensityTransformations module that introduces a new feature to the ScreenTransferFunction (STF) tool: The STF AutoStretch global action.

This action computes and applies an automatic screen stretch function to the active image. STF AutoStretch can be triggered by pressing the Ctrl+A keyboard combination (Cmd+A on Mac OS X), or by clicking the corresponding tool button on the Image tool bar. This feature has been requested by a number of users on this forum:

http://pixinsight.com/forum/index.php?topic=3328.0

I hope you like it!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: New Global Action: STF AutoStretch
« Reply #1 on: 2011 September 29 16:08:22 »
this is welcome news since autoSTF with uncoupled channels is the first thing i always do.

i hate to ask this, but... is there a reason why we can't have control-a on the mac as well? because i am an emacs user, i use unix style keyboards and i have the control key in the "right" place. it's a lot easier than using command (or control, which is in the wrong place on PC keyboards...)

maybe it's a wishlist item to be able to remap any keyboard shortcut in pixinsight?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Global Action: STF AutoStretch
« Reply #2 on: 2011 September 30 10:57:37 »
Quote
is there a reason why we can't have control-a on the mac as well?

Technically, there is no reason at all. However, a large majority of Mac users know nothing about UNIX and UNIX-style-anything --more at the contrary, they tend to get scared by these four letters together :)

The standard practice when porting Linux/UNIX/Windows applications to Mac OS X is to replace Ctrl with Cmd, and this is what I tend to do unless the corresponding keyboard combination is already being used for other purpose on Mac OS X.

Quote
maybe it's a wishlist item to be able to remap any keyboard shortcut in pixinsight?

I know this is a very necessary feature. It is in the to-do list, but given the priorities that we have now, don't expect to see it implemented in the short term.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: New Global Action: STF AutoStretch
« Reply #3 on: 2011 September 30 11:18:24 »

Quote
maybe it's a wishlist item to be able to remap any keyboard shortcut in pixinsight?

I know this is a very necessary feature. It is in the to-do list, but given the priorities that we have now, don't expect to see it implemented in the short term.

understood, thanks for all your hard work. i can live with it in the meantime :)

Offline jmtanous

  • PixInsight Addict
  • ***
  • Posts: 155
Re: New Global Action: STF AutoStretch
« Reply #4 on: 2011 September 30 14:37:35 »
Gracias Juan!

This is a welcome addition!

Cheers,

Jose

Offline Yuriy Toropin

  • PixInsight Addict
  • ***
  • Posts: 209
Re: New Global Action: STF AutoStretch
« Reply #5 on: 2011 October 01 03:19:17 »
Thanks a lot for this improvement!

Could couple of the next steps be done in the same direction? 

1. It will be logical if next CTRL + A or click on corresponding tool button will "Reset" STF to non-stretched state, Stretch - Reset - Stretch - Reset - ... ;

2. Even clicking CTRL + A could be boring...
Could "Auto Apply" feature be added to STF? If it will be turned ON then there will be no need in first CTRL + A click after new image will be opened, after that CTRL + A will work as expected, first click will "reset" (see #1), second will stretch, etc.

Thanks!

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: New Global Action: STF AutoStretch
« Reply #6 on: 2011 October 02 03:25:37 »
Hello Juan.

Can you show sources code ?
Why you don't save globally user preferences which set via dialog "STF Auto Stretch Parameterd" ?

Best regards,
Nikolay.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Global Action: STF AutoStretch
« Reply #7 on: 2011 October 04 02:40:28 »
Hi Yuriy,

Quote
1. It will be logical if next CTRL + A or click on corresponding tool button will "Reset" STF to non-stretched state, Stretch - Reset - Stretch - Reset - ... ;

There is already a keyboard combination reserved to reset STF: Ctrl+F12

There is also a tool button on the ScreenTransferFunction interface window that can be used to the same purpose; it is the standard Reset button that you can find at the bottom right corner of most tools.

Quote
2. Even clicking CTRL + A could be boring...
Could "Auto Apply" feature be added to STF? If it will be turned ON then there will be no need in first CTRL + A click after new image will be opened, after that CTRL + A will work as expected, first click will "reset" (see #1), second will stretch, etc.

From my experience, applying STF AutoStretch automatically upon opening images would create much more problems than solutions. It is also somewhat incoherent with important design patterns in PixInsight (don't give the user false impressions about the raw data).

There is now a script that applies AutoStretch to all open images. I wrote it in response to the wish list thread that you mentioned, but I hadn't the time to finish it appropriately. You'll find this script on the Process Explorer window: Scripts > Utilities > AutoSTF. Right now this script is very rough (it just applies AutoStretch to all open images and can't be interrupted), but it can be refined and polished with a GUI. I think this script is the best way to implement the functionality that you are describing.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: New Global Action: STF AutoStretch
« Reply #8 on: 2011 October 04 02:46:06 »
Quote
Can you show source code ?

Sure. Right now I have no access to the source code of this module, but later I'll send it to you.

Quote
Why you don't save globally user preferences which set via dialog "STF Auto Stretch Parameters" ?

I'll add this functionality in the next version.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: New Global Action: STF AutoStretch
« Reply #9 on: 2011 October 04 03:14:45 »
I am using Ctrl-A very frequently now. I very nice extension...
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: New Global Action: STF AutoStretch
« Reply #10 on: 2011 October 04 04:02:45 »
Yes, thanks so much for adding this in Juan. 
F12 is a handy on/off too now I see after you've first done a "Ctrl-A". 
Top stuff  8)
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: New Global Action: STF AutoStretch
« Reply #11 on: 2011 October 04 23:09:34 »
Quote
Can you show source code ?

Sure. Right now I have no access to the source code of this module, but later I'll send it to you.
Thank you.

Quote
Why you don't save globally user preferences which set via dialog "STF Auto Stretch Parameters" ?
I'll add this functionality in the next version.
Can you say in advance: if user set some parameters in the interface "STF Auto Stretch Parameters" it will be used via Ctrl+A ?

Offline Yuriy Toropin

  • PixInsight Addict
  • ***
  • Posts: 209
Re: New Global Action: STF AutoStretch
« Reply #12 on: 2011 October 05 22:29:00 »
Hi Juan, thanks for answering!
Quote
1. It will be logical if next CTRL + A or click on corresponding tool button will "Reset" STF to non-stretched state, Stretch - Reset - Stretch - Reset - ... ;
There is already a keyboard combination reserved to reset STF: Ctrl+F12

There is also a tool button on the ScreenTransferFunction interface window that can be used to the same purpose; it is the standard Reset button that you can find at the bottom right corner of most tools.
...you know, [F12] is too far from [A] button to consider STF On/Off switch as really smooth thing now.
Standard Reset button doesn't help a lot, aim mouse is longer then just click CTRL+A for other time.
My proposal will also save CTRL+F12 for other use...

Quote from: Juan Conejero
Quote
2. Even clicking CTRL + A could be boring...
Could "Auto Apply" feature be added to STF? If it will be turned ON then there will be no need in first CTRL + A click after new image will be opened, after that CTRL + A will work as expected, first click will "reset" (see #1), second will stretch, etc.

From my experience, applying STF AutoStretch automatically upon opening images would create much more problems than solutions. It is also somewhat incoherent with important design patterns in PixInsight (don't give the user false impressions about the raw data).

There is now a script that applies AutoStretch to all open images. I wrote it in response to the wish list thread that you mentioned, but I hadn't the time to finish it appropriately. You'll find this script on the Process Explorer window: Scripts > Utilities > AutoSTF. Right now this script is very rough (it just applies AutoStretch to all open images and can't be interrupted), but it can be refined and polished with a GUI. I think this script is the best way to implement the functionality that you are describing.
Thanks for pointing me out to this script!

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: New Global Action: STF AutoStretch
« Reply #13 on: 2012 January 23 02:57:43 »
I must be doing something wrong on my Mac.  Cmd-A does the autostretch, but I tried both Cmd-F12 and Ctrl-F12 and neither reset the stretch   ???

Edit: Never mind, just found it out by right-clicking on window, Ctrl-Opt-S does it.  Must've changed in more recent versions?
« Last Edit: 2012 January 23 03:25:00 by troypiggo »