Author Topic: Copying Previews to All Images?  (Read 6124 times)

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Copying Previews to All Images?
« on: 2010 August 05 19:25:34 »
To all,

Is there a quick way to copy all the previews of one image to all the remaining opened images?  It gets pretty tedious dragging the Preview tab from one image to the next.

Thanks,

Wade

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Re: Copying Previews to All Images?
« Reply #1 on: 2010 August 06 09:58:49 »
Sounds like a good idea.  Hell, i did not know you could drag a preview from one image to another.  Thanks for the lesson!
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Copying Previews to All Images?
« Reply #2 on: 2010 August 06 10:39:02 »
Hi Wade,

Use the 'preview' command. For example, the following command:

preview -new -x=10 -y=20 -w=400 -h=250 *

will create a new preview on every open image. Each preview will have its top left corner located at image coordinates x=10px y=20px, and its dimensions will be width=400px and height=250px.

Enter 'help preview' to see a list of all available arguments and options.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: Copying Previews to All Images?
« Reply #3 on: 2010 August 06 10:55:31 »
Juan,

Quote
Use the 'preview' command.

Thanks for the tip; however, I don't think this is going to save me any time. 

Here's what I'm doing.  At the beginning of the session, I create the three previews on an image.  I then open up three more images and drag these previews to each image.  I work on each image one at a time.  I save and close each image once their edits are complete.  Before closing the last image, I open three new images and drag each Preview to each newly opened image.  I repeat this process numerous times.

Is there a way to save the preview commands (e.g., similar to a script) so I can run them as soon as I open three new images?  This would prevent having to scroll back through the command window searching for the original preview commands.  What happens if the Previews already exist on an image?  Do I get duplicates?

Thanks,

Wade

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Copying Previews to All Images?
« Reply #4 on: 2010 August 06 10:55:59 »
Wow... I just typed "help" (alone) and I'm very surprised :D There should be a tip of this on the starting sequence output on the console.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Copying Previews to All Images?
« Reply #5 on: 2010 August 06 11:37:19 »
Quote
Is there a way to save the preview commands (e.g., similar to a script) so I can run them as soon as I open three new images?

You can define an alias for the preview command. For example:

alias mypreviews "preview -new -x=10 -y=20 -w=400 -h=250 *"

would create an alias command 'mypreviews' that is equivalent to the example preview command in my previous post. Now each time you run:

mypreviews

what is executed is the sequence between double quotes above (the aliased command).

Another option is creating an environment variable. For example:

export P="preview -new -x=10 -y=20 -w=400 -h=250 *"

creates an environment variable P. Now you can simply enter this command:

$P

and the value of P is sent to the console, running the same command as before.

To make an alias or a variable permanent (i.e. automatically created each time you launch PI) you can add the corresponding commands to your startup.scp script, which you'll find on the bin installation folder.

Quote
What happens if the Previews already exist on an image?  Do I get duplicates?

Yes, new previews are created with the same dimensions and coordinates. The platform ensures uniqueness of preview identifiers by adding suffixes (Preview01, Preview02, and so on).

Hope this helps!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Copying Previews to All Images?
« Reply #6 on: 2010 August 06 11:40:46 »
Hey Carlos,

Quote
Wow... I just typed "help" (alone) and I'm very surprised

Yes, the command line interface has grown a lot since a few versions. There are new commands in version 1.6.1 (hash, lsimg, lsws, lskwd) that I'll describe on the Release Information board, along with all the new features.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: Copying Previews to All Images?
« Reply #7 on: 2010 August 06 18:14:33 »
Juan,

Quote
You can define an alias for the preview command.

The alias is working perfectly.  Your help is greatly appreciated. 

Wade

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Copying Previews to All Images?
« Reply #8 on: 2010 August 07 03:44:50 »
Yes - control of PI via the Console is a subject that could have an entire book written about it, and it alone.

I find that I am using the Console far more now that I have it permanently visible on an auxilliary monitor.

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 Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 274
  • Resistance is futile.
    • Astronomí­a Sur
Re: Copying Previews to All Images?
« Reply #9 on: 2010 August 17 23:13:48 »
Inspired by this post, I wrote a simple script that can be useful. See here.

Best regards,

Enzo.

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: Copying Previews to All Images?
« Reply #10 on: 2010 September 07 18:44:04 »
Enzo,

Quote
Inspired by this post, I wrote a simple script that can be useful.

Awesome!  I'll give it a try when I attempt my next time-lapse this Winter, assuming I get a clear sky.

Wade

Offline Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 274
  • Resistance is futile.
    • Astronomí­a Sur
Re: Copying Previews to All Images?
« Reply #11 on: 2010 September 07 22:18:09 »
Awesome!  I'll give it a try when I attempt my next time-lapse this Winter, assuming I get a clear sky.

Wade

Thanks Wade!  :)

Enzo.