Author Topic: Blinking Script  (Read 87216 times)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blinking Script
« Reply #150 on: 2010 December 23 08:58:23 »
I made a very small change to the script. Now the statistics report (series anaylisis) writes the file without empty lines. This makes data import to a spreadsheet easier.

Regards,

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

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blinking Script
« Reply #151 on: 2010 December 23 09:58:14 »
Thank you Carlos.

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blinking Script
« Reply #152 on: 2011 January 08 06:00:24 »
Gents,

From the latest version of the <Animation> script - at the following point in the code (line 1110 in v2.91 from Carlos) :-

Code: [Select]
            for (var c=0; c < dest.mainView.image.numberOfChannels ; c++)
            {
               var st = new Array();
               st[0] = parent.Images[i].mainView.id;

               if (dest.mainView.image.numberOfChannels==1) {st[1]=chanelName[3];Channel[3]=true;}
               else {st[1]=chanelName[c]; Channel[c]=true;};

               st[2] = String(parent.Images[i].exposure);
               st[3] = Number(r*s[i][c].mean).toFixed(n);
               st[4] = Number(r*s[i][c].median).toFixed(n);
               st[5] = Number(r*s[i][c].avgDev).toFixed(n);
               st[6] = Number(r*s[i][c].stdDev).toFixed(n);
               st[7] = Number(r*s[i][c].minimum).toFixed(n);
               st[8] = Number(r*s[i][c].maximum).toFixed(n);
               j++;
               stat[j]=st;

               for (var k=0; k < st.length; k++)
               {
                  if (hl[k] < String(st[k]).length) hl[k] = String(st[k]).length;
               }
            }

How can the script be modified to include extra information from the FITS Header?

Specifically, my new QHY10 imager provides a "Temperature" parameter, and I would like to be able to include that in the series analysis extraction.

I can see that the basic format is st[2] = String(parent.Images[j].exposure), but (as usual) I can't find out what alternatives there are for .exposure :'(

Any suggestions?

Nikolai, I can envisage an upgraded script that provides a further dialogue box, where all of the available FITS Header parameters are presented to the user, and a check-box option is provided to allow users to select those data elements required.

Sorry, but you know me - I am always looking for 'something more' (I still have beer available, and Jedi Cookies ::))
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blinking Script
« Reply #153 on: 2011 January 12 08:44:54 »
Hi Niall
I did a quick inspection of the code, and the JS classes, but I can't find where the .exposure property came from! So I cannot help you there :P sorry.
(Oh how I love C++...)
Regards,

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

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blinking Script
« Reply #154 on: 2011 January 12 15:40:08 »
What? Two Jedii - and neither of us know the answer?

I feel we ought to hand back the cookies Carlos :'(
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 NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blinking Script
« Reply #155 on: 2011 January 12 18:16:25 »
I did a quick inspection of the code, and the JS classes, but I can't find where the .exposure property came from!
JS ImageWindow.Properties.exposure
Also i see ImageWindow.Properties.keywords and i hope it's FITS keywords.
 ;)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blinking Script
« Reply #156 on: 2011 January 12 20:39:11 »
Seems to... its an array.

Also, from ImageWindow.h (PCL, c++):
Code: [Select]
   /*!
      Obtains a copy of the %FITS header keywords currently defined for the
      image in this window. Returns true if this image has %FITS keywords.

      \param[out] kwds     Reference to a container that will receive a copy of
                           the %FITS keywords defined in this image.

      \sa SetKeywords(), ResetKeywords()
   */
   bool GetKeywords( FITSKeywordArray& kwds ) const;

So, I would say that it is highly likely that it contains the fits keywords, if they have been loaded.
Regards,

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

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blinking Script
« Reply #157 on: 2011 January 12 23:47:25 »
Hi guys,

OK, I am a tiny step closer.

It also ocurred to me to apply the FITS Header process to an image, then to look at the History Explorer for that image. When I do that, this is the code that appears:-
Code: [Select]
// Start time: 2011/01/13 07:40:51 UTC
// Execution time: 1.280 s
var p = new FITSHeader;
with ( p )
{
   keywords = [ // name, value, comment
      ["SIMPLE", "T", "file does conform to FITS standard"],
      ["BITPIX", "16", "number of bits per data pixel"],
      ["NAXIS", "2", "number of data axes"],
      ["NAXIS1", "2612", "length of data axis 1"],
      ["NAXIS2", "3896", "length of data axis 2"],
      ["EXTEND", "T", "FITS dataset may contain extensions"],
      ["COMMENT", "", "FITS (Flexible Image Transport System) format defined in Astronomy and"],
      ["COMMENT", "", "Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365."],
      ["COMMENT", "", "Contact the NASA Science Office of Standards and Technology for the"],
      ["COMMENT", "", "FITS Definition document #100 and other FITS information."], // row 10
      ["BZERO", "32768", "offset data range to that of unsigned short"],
      ["BSCALE", "1", "default scaling factor"],
      ["EXPOSURE", "600000", "Total Exposure Time[ms]"],
      ["GAIN", "'10      '", "Analog Gain"],
      ["OFFSET", "'126     '", "Analog Offset"],
      ["TIME", "'00:23:45'", "Begin captuer time"],
      ["DATE", "'07/01/2011'", "Capture Date"],
      ["CAMERA", "'QHY10   '", "Camera model"],
      ["Temperature", "'-30.4   '", "Begin capture temperature"],
      ["Presion Time", "'0-23-45-281'", "Begin capture Presion Time"] // row 20
   ];
}

However, I still don't know how to get an extra parameter into the Animation script :'(

I am trying to get the "Temperature" information (-30.4 in the example above) to be extracted into the statistics summary file. I thought it would be easy ::)
« Last Edit: 2011 January 14 13:30:36 by Niall Saunders »
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 vetenskapsman

  • Newcomer
  • Posts: 14
    • Cilice Astophotography
Re: Blinking Script
« Reply #158 on: 2011 March 20 23:25:51 »
Hi ... were you ever able to get the Temperature (or any other FITS Header information) extracted into the summary file?
That would be incredibly useful  8) 

I've been searching for a way to easily get FITS Header information for a batch of images (specifically EXPOSURE and
CCD-TEMP in my case) and the solution is oh so close with the Animation script.

-carl

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blinking Script
« Reply #159 on: 2011 April 14 05:16:35 »
Carlos, your ver 2.91 based on ver 2.8 :P
Thank Yuriy Toropin for attention.
Latest (including Carlos modification) version 2.92 in attachment. Deleted. New version below.
« Last Edit: 2011 April 18 03:55:40 by NKV »

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blinking Script
« Reply #160 on: 2011 April 14 07:33:58 »
jo :P

By the way, I have a suggestion for improvement: could add an option to change the image that is displayed in the control? Also the rescalation in it is sometimes weird (not in the sense that it is wrong, but that some images are better represented as they were stored). Could you just use the same SFT settings as with the animation itself?
Regards,

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

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blinking Script
« Reply #161 on: 2011 April 15 00:28:28 »
Could you just use the same SFT settings as with the animation itself?
You mean STF ? Done. See ver 2.93 in attachment  :)
Use autoSTF, autoHT, LinkRGB, ResetSTF&HT buttons to assign current image to control window.

But, i am going crazy... because i cant understand why code in line 968:
Code: [Select]
console.writeln("this.AutoSTF_Button dest.mainView.image.isColor ",dest.mainView.image.isColor);
         preview.assign(dest.mainView.image); //asign courent image to preview image
console.writeln("this.AutoSTF_Button preview.isColor ",preview.isColor);
give strange result:
Code: [Select]
this.AutoSTF_Button dest.mainView.image.isColor true
this.AutoSTF_Button preview.isColor false

But, same code in line 1028 working good:
Code: [Select]
this.AutoHT_Button dest.mainView.image.isColor true
this.AutoHT_Button preview.isColor true

Any idea ?
« Last Edit: 2011 April 18 03:56:08 by NKV »

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blinking Script
« Reply #162 on: 2011 April 15 04:17:23 »
Hi Nikolai,

I understand that you are currently working on other issues with the Animation script at the moment, but did you ever get a chance to look at the question I raised a few months ago (concerning the ability to include other FITS header information in the Summary Details listing and file output)?

How did you manage to 'find' the method for including the FITS data that you already include?

Juan - is there any way that you can help here? Nikolai's script is a wonderful tool, but has scope for improvement (as is always the case  :P)

My final (for the moment) 'wish' would be to be able to 'graph' the summary information without having to resort to the likes of MS Excel - have you ever thought about this as a task Nikolai (or anyone else for that matter)?
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 georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Blinking Script
« Reply #163 on: 2011 April 15 04:26:56 »
...My final (for the moment) 'wish' would be to be able to 'graph' the summary information without having to resort to the likes of MS Excel - have you ever thought about this as a task Nikolai (or anyone else for that matter)?

Hi Niall,

I described my idea how table views might be integrated into PI in http://pixinsight.com/forum/index.php?topic=2306.0 . Other applications I know do it this way, and I like it.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blinking Script
« Reply #164 on: 2011 April 15 04:27:26 »
Hello Niall,
I hope to add FITSKeyword data during next week.