Author Topic: Blinking Script  (Read 87220 times)

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blink?
« Reply #45 on: 2010 May 23 12:54:13 »
Quote
just move mouse cursor to FileList and use mousewheel

Duh, I hadn't tried that . . . .

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 Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Blink?
« Reply #46 on: 2010 May 23 15:16:36 »
Quote
Juan, I think this deserves inclusion with v1.6.1

That's for sure. Very nice work, Nikolay!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blink?
« Reply #47 on: 2010 May 23 21:31:23 »
I like being able to expand the window 'vertically' (to be able to see more of the list entries), but it would also be nice to expand 'horizontally' to see more of the filenames (mine tend to be rather long, and the numeric ID tends to be at the far right!!)
Like that?
« Last Edit: 2010 May 25 20:02:39 by NKV »

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Blink?
« Reply #48 on: 2010 May 24 04:55:08 »
Very very impressive.
Was just lamenting something like this to check out a bunch of images I'd collected recently.  Had even pondered trialing CCDStack.  This is a great little utility, and also speaks volumes for the software and user base to have the code laid out for all to see/use.  

Many thanks Nikolay!
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Blink?
« Reply #49 on: 2010 May 24 10:14:24 »
Hi

Thanks very much for your new and improved version  ;D

I appreciate your time and work you have put into this  8)

Harry
Harry Page

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blink?
« Reply #50 on: 2010 May 25 20:01:52 »
Thank you, and sorry for frequent updates.
One more update...
Now added a very useful (I hope) button: Auto-histograms for all images. But if you use this button, please be patient to wait until the console window will be closed.

Also, what you to like see in next version? Maybe "rename/move/delete unchecked", any other idea?

I like to see during animation ADU under mouse position and maybe whole image statistic...  ::)
maybe generate file.txt and graph of statistic's series? :o
Oh... I am going to expand simple "blinker" to "Series Analyser" :sealed:

Code: [Select]
#feature-id    Utilities > Animation
#feature-info  This script animate set of images.

#include <pjsr/NumericControl.jsh>
#include <pjsr/FrameStyle.jsh>
#include <pjsr/SampleType.jsh>
#include <pjsr/UndoFlag.jsh>
#include <pjsr/StdButton.jsh>
#include <pjsr/StdIcon.jsh>
#include <pjsr/StdCursor.jsh>
#include <pjsr/Sizer.jsh>
#include <pjsr/TextAlign.jsh>

#define shadowsClipping -1.25
#define targetBackground 0.25


function MyDialog()
{
   this.__base__ = Dialog;
   this.__base__();

   this.abort = false;
   this.busy = false;
   this.go = false;
   this.curentImage = 0;
   this.wait = 0;
   var rgbLinked = true;
   // Open files ---------------------------------------------------------------------------------------
   console.writeln("Prepare images");
   var inputFileDialog=new OpenFileDialog();
   inputFileDialog.caption="Select files for animation";
   inputFileDialog.loadImageFilters();
   inputFileDialog.multipleSelections=true;
   if (!inputFileDialog.execute())return;
   var inputFiles=inputFileDialog.fileNames;
   var Images= new Array(inputFiles.length);
   for (var i=0;i<inputFiles.length;++i)
   {
      var fileName=inputFiles[i];
      var w= ImageWindow.open( inputFiles[i] );
         if (w.length == 0)
         {
            console.writeln("Unable to process file ",fileName);
            break;
         }
      if (w[0].bitsPerSample != 16) w[0].setSampleFormat(16,false);
      Images[i]=w[0];
      if (Images[i].mainView.image.isColor) rgbLinked = false;
   }
   var img =Images[0].mainView.image;


   // prepare Animation window ---------------------------------------------------------------------------------------
   var dest = new ImageWindow(1, 1, 1,img.bitsPerSample, img.sampleType == SampleType_Real, img.isColor,"Show" );
   dest.mainView.beginProcess( UndoFlag_NoSwapFile );
   dest.mainView.image.assign( img );
   dest.mainView.endProcess();
   AutoSTF ();
   dest.zoomFactor=11;
   dest.fitWindow();
   dest.zoomFactor=-11;
   dest.fitWindow();
   dest.zoomFactor=1;
   dest.show();

   // prepare image for scroll window--------------------------------------------------------------
   var result=new Image();
   result.assign(dest.mainView.image);
   HT(result);

   console.hide();

   //---------------------------------------------------------------------------------------
   // Ensure unconditional job abortion upon dialog termination
   this.onHide = function()
   {
      this.abort = true;
      this.go = false;
      dest.forceClose();
      for (var i=0;i<inputFiles.length;++i) Images[i].forceClose();
   }

   //---------------------------------------------------------------------------------------
   // AutoSTF
   function AutoSTF ()
   {
      var img = dest.mainView;
      var n = img.image.numberOfChannels;
      if (rgbLinked || n == 1)
      {
         var c0 = 0;
         var m = 0;
         for ( var c = 0; c < n ; c++ )
         {
            img.image.selectedChannel = c;
            var s = new ImageStatistics (img.image);
            c0 += s.median + shadowsClipping*s.avgDev;
            m += s.median;
         }
         c0 /= n;
         m = Math.mtf(targetBackground , m/n - c0 );
         var STF =[[m,1,c0,0,1],[m,1,c0,0,1],[m,1,c0,0,1],[0.5,0, 1,0,1]];
      }
      else
      {
         var STF = new Array();
         for ( var c = 0; c < n ; c++ )
         {
            img.image.selectedChannel = c;
            s = new ImageStatistics (img.image);
            c0 = s.median + shadowsClipping*s.avgDev;
            m = Math.mtf(targetBackground , s.median - c0 );
            STF.push([m, 1, c0, 0, 1]);
         }
         STF.push([0.5,0,1,0,1]);
      }
      img.stf = STF ;
   }


   // ResetSTF
   function ResetSTF ()
   {
      dest.mainView.stf=[  [0.5, 1, 0, 0, 1],
                           [0.5, 1, 0, 0, 1],
                           [0.5, 1, 0, 0, 1],
                           [0.5, 1, 0, 0, 1],];
   }

   // HT
   function HT (img)
   {

      var wtmp = new ImageWindow( 1, 1, 1,img.bitsPerSample, img.sampleType == SampleType_Real, img.isColor );
      var v = wtmp.mainView;
      v.beginProcess( UndoFlag_NoSwapFile );
      v.image.assign( img );
      v.endProcess();

      var stf = dest.mainView.stf;
      var HT = new HistogramTransformation;
      if (img.isColor)
      {
         HT.H = [[stf[0][1], stf[0][0], stf[0][2], stf[0][3], stf[0][4]],
                 [stf[1][1], stf[1][0], stf[1][2], stf[1][3], stf[1][4]],
                 [stf[2][1], stf[2][0], stf[2][2], stf[2][3], stf[2][4]],
                 [ 0, 0.5, 1, 0, 1]];
      }
      else
      {
         var low=(stf[0][1]+stf[1][1]+stf[2][1])/3;
         var mtf=(stf[0][0]+stf[1][0]+stf[2][0])/3;
         var hgh=(stf[0][2]+stf[1][2]+stf[2][2])/3;

         HT.H =
            [[  0, 0.5,   1, 0, 1],
             [  0, 0.5,   1, 0, 1],
             [  0, 0.5,   1, 0, 1],
             [low, mtf, hgh, 0, 1],
             [  0, 0.5,   1, 0, 1]];
      }
      HT.executeOn( v, false ); // no swap file

      img.assign(v.image);
      wtmp.forceClose();
      return img;
   }


   //---------------------------------------------------------------------------------------
   this.UpdateImage = function()
   {
      dest.mainView.beginProcess( UndoFlag_NoSwapFile );
      dest.mainView.image.assign( Images[this.curentImage].mainView.image );
      dest.mainView.endProcess();
      this.infoLabel.text = Images[this.curentImage].mainView.id;
   }

   //---------------------------------------------------------------------------------------
   this.Animation = function()
   {
      if (!this.go) return;
      var lastCallTime = Date.now();
      var w;
      while (true)
      {
         for (;this.curentImage<inputFiles.length;++this.curentImage)
         {
            if ( this.files_TreeBox.child( this.curentImage ).checked )
            {
               if (this.wait > 0)
               {
                  while ( (w = lastCallTime + this.wait - Date.now()) > 0 )
                  {
                     if (w > 50) sleep(0.02);
                     processEvents(); if (this.abort) return;
                  }
                  lastCallTime = Date.now();
               }
               else {processEvents(); if (this.abort) return;}
               this.UpdateImage();
            }
            else {processEvents(); if (this.abort) return;}
         }
         this.curentImage=0;
      }
   }


   //---------------------------------------------------------------------------------------
   this.generate = function()
   {
      // If we are already generating data, request job abortion and return.
      if ( this.busy ) return;
      this.busy = true;
      this.abort = false;
      this.Animation();
      this.busy = false;
   };


   //---------------------------------------------------------------------------------------
   // thrumbal image for navigate

   this.ScrollControl = new Control( this );
   with ( this.ScrollControl )
   {
      var w = dest.mainView.image.width;
      var h = dest.mainView.image.height;
      var Size=200;
      setFixedSize( Size, Size*h/w );
      var k=1/w*Size;
      cursor = new Cursor( StdCursor_CirclePlus );
      onPaint = function()
      {
         // exstract viewing parts of image dest_(x0 x1 y0 y1)
         var Zoom=dest.viewportWidth/w;
         var Dx0=dest.viewportPosition.x/Zoom;
         var Dy0=dest.viewportPosition.y/Zoom;
         var Dx1=dest.visibleViewportRect.x1/Zoom;
         var Dy1=dest.visibleViewportRect.y1/Zoom;
         if (Dx1 > w) Dx1=w;
         if (Dy1 > h) Dy1=h;

         // calculate x0 x1 y0 y1 for Green rectangle
         var x0=Dx0*k;
         var y0=Dy0*k;
         var x1=x0+Dx1*k;
         var y1=y0+Dy1*k;

         var G = new Graphics( this );
         G.drawScaledBitmap( this.boundsRect, result.render() );
         G.pen = new Pen( 0xFF00FF00 ); //Green
         G.drawRect(x0,y0,x1,y1);
         G.end();
         gc();
      }
      onMousePress = function(x,y)  { dest.setViewport( x*w/Size, y*w/Size ); repaint(); }
      onMouseMove = function(x,y)   { dest.setViewport( x*w/Size, y*w/Size ); repaint(); }
      onMouseWheel = function(Dx,Dy, MouseWheel) { if (MouseWheel >0) dest.zoomOut(); else dest.zoomIn(); repaint(); }
   }


   //---------------------------------------------------------------------------------------
   // info / curent image
   this.infoLabel = new Label( this );
   with ( this.infoLabel )
   {
      frameStyle = FrameStyle_Sunken;
      margin = 2;
      text = "Push Play button";
      textAlignment = TextAlign_VertCenter;
   }

   //---------------------------------------------------------------------------------------
   // Zoom

   this.zoomFitView_Button = new ToolButton( this );
   this.zoomFitView_Button.icon = new Bitmap( ":/images/image_window/fit_view_active.png" );
   this.zoomFitView_Button.toolTip = "Fit View";
   this.zoomFitView_Button.onClick = function() { dest.fitWindow(); this.dialog.ScrollControl.repaint(); }

   this.zoomToFit_Button = new ToolButton( this );
   this.zoomToFit_Button.icon = new Bitmap( ":/images/image_window/zoom_to_fit_active.png" );
   this.zoomToFit_Button.toolTip = "Zoom To Fit";
   this.zoomToFit_Button.onClick = function() { dest.zoomToFit(); this.dialog.ScrollControl.repaint(); }

   this.zoomToOptimalFit_Button = new ToolButton( this );
   this.zoomToOptimalFit_Button.icon = new Bitmap( ":/images/image_window/zoom_to_best_fit_active.png" );
   this.zoomToOptimalFit_Button.toolTip = "Zoom To Optimal Fit";
   this.zoomToOptimalFit_Button.onClick = function() { dest.zoomToOptimalFit(); this.dialog.ScrollControl.repaint(); }

   this.zoom_1_1_Button = new ToolButton( this );
   this.zoom_1_1_Button.icon = new Bitmap( ":/images/image_window/zoom_1_1_active.png" );
   this.zoom_1_1_Button.toolTip = "Zoom 1:1";
   this.zoom_1_1_Button.onClick = function() { dest.zoomFactor=1; this.dialog.ScrollControl.repaint(); }


   //---------------------------------------------------------------------------------------
   // STF
   this.AutoSTF_Button = new ToolButton( this ); // STF
   with ( this.AutoSTF_Button )
   {

      icon = new Bitmap( ":/images/stf.png" );
      icon = new Bitmap( ":/images/copy_stf_to_window.png" );
      toolTip = "Auto ScreenTransferFunction by current image";
      onClick = function()
      {
         console.show();
         this.dialog.cursor = new Cursor( StdCursor_ArrowWait );
         AutoSTF ();
         this.dialog.cursor = new Cursor( StdCursor_Arrow );
         console.hide();
      }
   }


   this.AutoHT_Button = new ToolButton( this ); // STF2
   with ( this.AutoHT_Button )
   {
      icon = new Bitmap( ":/images/copy_stf_to_all_views.png" );
      toolTip = "Auto HistogramTransformation to all image";
      var v = true;
      onClick = function()
      {
         enabled =false;
         console.show();
         this.dialog.cursor = new Cursor( StdCursor_ArrowWait );
         if (v)
         {
            this.dialog.AutoSTF_Button.enabled = false;
            console.writeln("Auto histogram for ",inputFiles.length, " images" );
            var c=parent.curentImage; //save curent image
            for (i =0; i < inputFiles.length; i++)
            {
               console.writeln("Generate statistics for ", Images[i].mainView.id);
               parent.curentImage=i;
               parent.UpdateImage();
               AutoSTF ();
               var img = Images[i].mainView;
               img.beginProcess();
               HT(img.image);
               img.endProcess();
               console.writeln();
            }
            parent.curentImage=c; //restore
            ResetSTF ();
            parent.UpdateImage();
            icon = new Bitmap( ":images/reset_stf_to_all_views.png" );
            toolTip = "Undo HistogramTransformation";
            gc();
         }
         else //undo HistogramTransformation
         {
            console.writeln("Restoring ",inputFiles.length, " images" );

            var i=parent.curentImage; //save curent image
            for (i =0; i< inputFiles.length; i++) Images[i].undo();
            console.writeln("Generate statistics for ", Images[parent.curentImage].mainView.id);
            parent.UpdateImage();
            AutoSTF();
            icon = new Bitmap( ":/images/copy_stf_to_all_views.png" );
            toolTip = "Auto HistogramTransformation to all image";
            this.dialog.AutoSTF_Button.enabled = true;
         }
         v = !v;
         this.dialog.cursor = new Cursor( StdCursor_Arrow );
         console.hide();
         enabled =true;
      }
   }


   this.rgbLinked_CheckBox = new ToolButton( this ); // Link RGB
   with ( this.rgbLinked_CheckBox )
   {
      icon = new Bitmap( ":/images/rgb.png" );
      toolTip = "Link RGB Channels";
      checkable = true;
      checked = rgbLinked;
      enabled = !rgbLinked;
      onClick = function( value )
      {
         rgbLinked = value;
         if (this.dialog.AutoSTF_Button.enabled) this.dialog.AutoSTF_Button.onClick();
      }
   }

   this.ZoomSTF_Sizer = new HorizontalSizer;
   with (this.ZoomSTF_Sizer)
   {
      add( this.zoomFitView_Button );
      add( this.zoomToFit_Button );
      add( this.zoomToOptimalFit_Button );
      add( this.zoom_1_1_Button );
      add( this.AutoSTF_Button );
      add( this.AutoHT_Button);
      add( this.rgbLinked_CheckBox );
      addStretch();
   }


//-------------------------------------------------------
// Action buttons
   this.prevImage_Button = new ToolButton( this );
   with ( this.prevImage_Button )
   {
      toolTip = "Prev";
      icon = new Bitmap( ":/images/exit.png" );
      onClick = function()
      {
         parent.Stop_Button.onClick();
         if (parent.curentImage==0) parent.curentImage=inputFiles.length;
         parent.curentImage--;
         parent.UpdateImage();
      }
   }

   this.nextImage_Button = new ToolButton( this );
   with ( this.nextImage_Button )
   {
      toolTip = "Next";
      icon = new Bitmap( ":/images/exit.png" ).mirroredHorizontally();
      onClick = function()
      {
         parent.Stop_Button.onClick();
         parent.curentImage++;
         if (parent.curentImage==inputFiles.length) parent.curentImage=0;
         parent.UpdateImage();
      }
   }

   this.Stop_Button = new ToolButton( this );
   this.Stop_Button.toolTip = "Stop";
   this.Stop_Button.icon = new Bitmap( ":/images/view_explorer.png" );
   this.Stop_Button.onClick = function() { this.dialog.abort = true; this.dialog.go = false; }

   this.Play_Button = new ToolButton( this );
   this.Play_Button.toolTip = "Play";
   this.Play_Button.icon =  new Bitmap( ":/images/processing_console.png")
   this.Play_Button.onClick = function() { this.dialog.go = true; this.dialog.generate(); }

   this.speed_ComboBox = new ComboBox( this );
   with ( this.speed_ComboBox )
   {
      toolTip = "Delay";
      var delay = new Array (0,100,200,500,1000,2000,5000);
      var Text = new Array ("Unlimit","0.1 Sec","0.2 Sec","0.5 Sec","1 Sec","2 Sec","5 Sec");
      for ( i=0 ; i<Text.length ; i++) addItem( Text[i] );
      onItemSelected = function(i) { parent.wait = delay[i]; parent.ScrollControl.repaint(); }
   }

   //  Expand File List ---------------------------------------
   this.TreeBox_Button = new ToolButton( this );
   with ( this.TreeBox_Button )
   {
      icon = new Bitmap( ":/images/expand.png" );
      toolTip = "Show file list";
      checkable = true;
      onClick = function()
      {
         if (checked)
         {
            parent.files_TreeBox.show();
            icon = new Bitmap( ":/images/contract.png" );
            parent.adjustToContents();
         }
         else
         {
            parent.files_TreeBox.hide();
            icon = new Bitmap( ":/images/expand.png" );
            parent.adjustToContents();
         }
      }
   }


   this.PrevNextStopPlay_Sizer = new HorizontalSizer;
   with (this.PrevNextStopPlay_Sizer)
   {
      add( this.prevImage_Button );
      add( this.nextImage_Button );
      add( this.Stop_Button );
      add( this.Play_Button );
      addStretch();
      add( this.speed_ComboBox,1);
      add( this.TreeBox_Button);
   }


//----------------------------------------------------------
// File List
   this.files_TreeBox = new TreeBox( this );
   with ( this.files_TreeBox )
   {
      hide();
      rootDecoration = false;
      numberOfColumns = 1;
      headerVisible = false;
      onNodeDoubleClicked = function()
      {
         parent.curentImage = childIndex(currentNode);
         parent.UpdateImage();
      }
   }
   for ( var i = 0; i < inputFiles.length; ++i )
   {
      var node = new TreeBoxNode( this.files_TreeBox );
      node.setText( 0, Images[i].mainView.id );
      node.checked = true;
   }


   //---------------------------------------------------------------------------------------
   // arange control element
   this.sizer1 = new VerticalSizer;
   with ( this.sizer1 )
   {
      margin = 2;
      spacing = 2;
      add( this.ScrollControl );
      add( this.infoLabel );
      add( this.ZoomSTF_Sizer );
      add( this.PrevNextStopPlay_Sizer );

   }

   this.sizer = new HorizontalSizer;
   with ( this.sizer )
   {
      margin = 2;
      spacing = 2;
      add( this.sizer1 );
      add( this.files_TreeBox,1 );
   }

   this.windowTitle = "Animation";
   this.adjustToContents();
   this.setFixedHeight();
}

MyDialog.prototype = new Dialog;
function main()
{
   console.show();

   var dialog = new MyDialog;
   if (!dialog.execute()) dialog.cancel();
   gc();
}
main();

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Blink?
« Reply #51 on: 2010 May 25 23:55:00 »
Hi,

I don't know if you saw the graphs I posted yesterday (elsewhere on the Forum) - showing how I use MS Excel to look at the 'series analysis data' that is exported by AIP4WIN?

If you haven't got, or used, AIP4WIN, I find the Series Analysis tool a godsend. I still use it to double-check all of my data after every imaging session, before even thinking of calibration and integration.

It certainly would be useful to see something like that 'native' to PI.

I can send you screenshots if it will help.

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 NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Blink?
« Reply #52 on: 2010 May 26 00:07:12 »
Yes, I use Series Analysis of AIP4WIN very often. So I have a chance to go in the right direction.

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Blink?
« Reply #53 on: 2010 May 26 01:59:19 »
Something similar in the "Stack" routines of Maxim - basically allowing you to assess FHWM, roundness, intensity and contrast.  First 2 particularly handy if you're talking about something similar.
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: Blink?
« Reply #54 on: 2010 May 26 02:39:20 »
Something similar in the "Stack" routines of Maxim - basically allowing you to assess FHWM, roundness, intensity and contrast.  First 2 particularly handy if you're talking about something similar.
I will if StarStatistics module will provide whole image statistic. Now just wait or help Carlos Milovic to do it. ;)

Also, I don't have CCDInspector, so I want to see similar tools in PixInsight.

Offline RobF2

  • PixInsight Addict
  • ***
  • Posts: 189
  • Rob
    • Rob's Astropics
Re: Blink?
« Reply #55 on: 2010 May 26 02:49:38 »
Also, I don't have CCDInspector, so I want to see similar tools in PixInsight.

Oh my - that would really make some people sit up and take notice of the software!
FSQ106/8" Newt on NEQ6/HEQ5Pro via EQMOD | QHY9 | Guiding:  ZS80II/QHY5IIL | Canon 450D | DBK21 and other "stuff"
Rob's Astropics

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Blink?
« Reply #56 on: 2010 May 26 07:19:58 »
I use DeepSkyStacker to analyze (and stack) my images. It grades images based on several parameters and assigns a score. You can then sort by any of these parameters and decide which ones to stack.

So sure, it would be great of PI to include this but it's already available for free so no rush on my account :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blink?
« Reply #57 on: 2010 May 26 08:38:20 »
Quote
I will if StarStatistics module will provide whole image statistic. Now just wait or help Carlos Milovic to do it.

StarStatistics is a class that performs the PSF fit just to one star. Having said that, there is no problem at all to create an array of this kind of objects, and perform fits to all stars (previously detected). The original idea was to include StarStatistics to the PCL, so every module would access to it.

At this stage, I'm confident that StarStatistics is ready to perform well, so it is just a matter of implementing such process that works with the whole image. I'll be working on a better single PSF reader... I may include new parameters that store FWHM values, so you may write a script that calls ReadPSF and then read the FWHM from it (and it should have a "mute" opcion, to disable all the console outputs). Give me a few days to do that. :)
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: Blink?
« Reply #58 on: 2010 May 26 08:51:59 »
Quote
It grades images based on several parameters and assigns a score

The only 'shortfall' with DSS (which is 'excellent' it has to be said) is that the statistics are summarised as 'all image' statistics - which is fine for certain requirements.

I think that the idea here is that it would be great to have statistics available in PI, at the individual star level. Once available at 'Star' level, then arrays and super-arrays can be created thereafter : from one star - to all stars - to all images - to entire image group.

That way everybody gets all the flexibility that THEY need to accomplish a given task.

My 2¢-worth

Cheers,
« Last Edit: 2010 May 26 09:02:32 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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Blink?
« Reply #59 on: 2010 May 26 09:03:18 »
Yes, I agree with you.
Once you have the individual statistics, there are lots of applications: photometry (most obvious), image quality (average all fwhms), inspect the focus plane (plot fwhm values, interpolating, as a new image, and this will give a good idea of what is happening)...
But, the first step it to be able to do that with a single star. That is ready (or, almost... needs Juan's approval :D ). Now the task is to implement that tool.
Regards,

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