Author Topic: Batch Channel Extraction script  (Read 10435 times)

Offline sjbrown

  • Member
  • *
  • Posts: 51
Batch Channel Extraction script
« on: 2010 October 21 19:50:37 »
Greetings,

As I have been a guest on these forums for some time now I thought I should start making some contributions to the community.
My first shall be a batch script in response to a wishlist item from Simon (http://pixinsight.com/forum/index.php?topic=2474.msg0;boardseen#new).

This is a straight forward script designed to extract the individual color channels from RGB images. I have modified it from it's original state
to include the option to choose which channel to extract (default is all three). The extracted channel(s) are saved to a directory of your choosing
or to the directory of the first input file. Also included are edit boxes for a prefix or postfix (or both??). The last two controls allow you to
set the sample format and extension of the output files as a whole.

More to come...

John

Forgot to attach the script :-[ :-[
« Last Edit: 2010 October 21 19:56:07 by sjbrown »

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Batch Channel Extraction script
« Reply #1 on: 2010 October 22 01:47:50 »
Hi John,

I tried this out and it seems to work just fine! Many thanks for this, its really appreciated.

By the way, will it only save files in fit format? I changed the extension to tif but it seems to ignore it and always write to a fit extension.

Cheers
         Simon

Offline sjbrown

  • Member
  • *
  • Posts: 51
Re: Batch Channel Extraction script
« Reply #2 on: 2010 October 22 10:18:46 »
Simon,

Thanks for spotting that bug! For some reason the trim method of the string object was not working in my implementation
and was preventing the change in the extension.

I have tested the attatched version and it does convert to Tiff. Let me know if there are any other problems.

John

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Batch Channel Extraction script
« Reply #3 on: 2010 October 23 01:56:56 »
Yes, that works perfectly. Many thanks again for a great script!

Offline sjbrown

  • Member
  • *
  • Posts: 51
Re: Batch Channel Extraction script
« Reply #4 on: 2010 October 23 16:28:59 »
You're very welcome. 8)

My current camera is an unmodified Cannon XSi so I will be interested in your results with Ha. Could be
very useful for enhancing the detail in RGB images.

JB

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Re: Batch Channel Extraction script
« Reply #5 on: 2010 October 24 17:08:07 »
I'm using it with an modded Canon 400D with a 150mm Pentax 67 lens. The improvement in resolution from RGB to Halpha is impressive....which agrees well with comments that Twade has made on this forum about the 200mm Pentax 67 lens. The improvement is so much that I'm seriously thinking about investing in a Si and O filter to get the (false) three colour image (hubble palette?) rather than just using HaRGB which was my original plan.

Either way, your script is coming in very useful!  ;)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Batch Channel Extraction script
« Reply #6 on: 2010 November 03 05:29:03 »
Hi John,

Welcome to PixInsight development. Good job, this is a useful and nicely done script. Would you mind me including it into the next release?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sjbrown

  • Member
  • *
  • Posts: 51
Re: Batch Channel Extraction script
« Reply #7 on: 2010 November 03 18:27:57 »
Hi Juan,

Thankyou for your kind words.

As an amature(hobbyist) programmer I would be honored to have my work included in the next release
of PI(which is arguably "the premier astrophotography processing software' available!). :D

I have attatched a new version of the script which addresses some minor corrections/additions
and most importantly references the code sections borrowed from your batch format conversion
script.

John