Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bianry

Pages: [1]
1
Gallery / NGC 5033. Critique please, Take 2
« on: 2014 March 25 09:49:25 »
Here is my first try at my white whale. About 2 hours total. Lum bin 1 + RGB bin 2

Would very much like tips on how to improve it. I have planned to take one more hour (at least) of images. I am not looking for praise but real ideas on what I should work on.

I have some ideas on what aspects I don't like but am awaiting your input.

Ok. This is v 2.0.

I my own opinion it is better. Not good. The composition is not right. It is cropped too tight I think. More space around the galaxy is needed.....



regards

Mats


2
Gallery / Antennae (by Hubble)
« on: 2014 March 19 07:32:53 »
Trawling the depths of Hubble Legacy Archive.

A lot of nice frames there. Perfect to practice your PI-juju on.



regards

Mats

3
PCL and PJSR Development / Saving in CSV
« on: 2014 March 12 01:10:34 »
I am working on a script for fixing dark columns/rows. It saves the bad columns to a file. The file is binary.
Code: [Select]
f.createForWriting(fileName);
            f.write(engine.columns.length,DataType_UInt16);
            console.writeln("Number of columns saved: " + engine.columns.length);
            if(engine.columns.length != 0)
               f.write(engine.columns,DataType_Int32);

            f.write(engine.rows.length,DataType_UInt16);
            console.writeln("Number of rows saved: " + engine.rows.length);
            if(engine.rows.length != 0)
               f.write(engine.rows,DataType_Int32);

            f.write(engine.iterations,DataType_UInt16);
            console.writeln("Number of iterations saved: " + engine.iterations);
            f.close();
How can I save the file in text format.CSV, json or XML. Would prefer to be able to edit the files outside my script.

regards

Mats

4
New Scripts and Modules / Fix dark columns script
« on: 2014 March 11 13:37:35 »
I need to fix dark columns in some of my frames.
I found this script http://pixinsight.com/forum/index.php?topic=806.15 and has added to it.
You can now save it as a process to the desktop. There were also some bugs in the remove procedure that are fixed now.

I have only a Win7 machine to test on so would appreciate if someone tried it. Might be some bugs still.....

Code: [Select]
// Script to correct columns and row defects of an image
// Based on the script from the image processing tutorial:
// "NGC 5189 from GeminiObservatory..." by J.Conejero
// and on the script to average two columns by Sander:
// http://pixinsight.com/forum/viewtopic.php?t=748

//Modified by Mats Andersson 2014

#feature-id Utilities > FixDarkColumns

#feature-info  An example script to fix darker columns that are still in frame \
               after calibration.

#feature-icon  DrawSignature.xpm

#include <pjsr/Sizer.jsh>
#include <pjsr/FrameStyle.jsh>
#include <pjsr/TextAlign.jsh>
#include <pjsr/StdButton.jsh>
#include <pjsr/StdIcon.jsh>
#include <pjsr/DataType.jsh>
#include <pjsr/ColorSpace.jsh>

#define VERSION   1.1
#define TITLE     FixDarkColumns
#define NO__DEBUG__


function FixColumnEngine()
{

   this.initialize = function()
   {
      // Default parameters
      this.fixColumn = true;
      this.fixRow    = false;
      this.position  = 0;
      this.iterations = 1;

      this.doColumns = false;
      this.doRows    = false;
      this.columns   = new Array;
      this.rows      = new Array;
      this.average   = true;


      if ( Parameters.isViewTarget || Parameters.isGlobalTarget )
      {
         // Our script is being executed as a Script instance.

         // Retrieve instance parameters
         if ( Parameters.has( "position" ) )
            this.position = Parameters.getUInt( "position" );

         if ( Parameters.has( "iterations" ) )
            this.iterations = Parameters.getUInt( "iterations" );

         if ( Parameters.has( "columns" ) )
         {
            var temp = Parameters.getString( "columns" ).split(",");
            for(var i = 0; i < temp.length; i++)
               this.columns.push(parseInt(temp[i]));
            this.doColumns = true;
         }

         if ( Parameters.has( "rows" ) )
         {
            var temp = Parameters.getString( "rows" ).split(",");
            for(var i = 0; i < temp.length; i++)
               this.rows.push(parseInt(temp[i]));
            this.doRows = true;
         }


      }

      if ( Parameters.isViewTarget )
         // View context: use the target view.
         this.targetView = Parameters.targetView;
      else
      {
         // Direct or global contexts: use the active view.
         var window = ImageWindow.activeWindow;
         if ( !window.isNull )
            this.targetView = window.currentView;
      }

   };

   this.apply = function()
   {
      with ( this )
      {
         // Export script parameters. We must carry out this here, *before* applying
         // our routine to targetView, so that a newly created Script instance will
         // encapsulate our current set of working parameters.
         exportParameters();

         // Tell the core application that we are going to change this view.
         // Without doing this, we'd have just read-only access to the view's image.
         targetView.beginProcess();

         // Perform our drawing routine.
         fixLinesEngine();

         // Done with view.
         targetView.endProcess();
      }
   };

   this.exportParameters = function()
   {
      with ( this )
      {
         Parameters.set( "position", position );
         Parameters.set( "iterations", iterations );

         if(columns.length > 0)
            Parameters.set( "columns", columns );

         if(rows.length > 0)
            Parameters.set( "rows", rows );


      }
   };



   this.initialize();

}

// Global FixColumns parameters.
var engine = new FixColumnEngine;

/**
 * FixColumnDialog is a graphical user interface to define
 * FixColumn parameters.
 */
function FixColumnDialog()
{
   this.__base__ = Dialog;
   this.__base__();

   var emWidth = this.font.width( 'M' );
    var labelWidth1 = this.font.width( "Column/Row position (px):" );
    var labelWidth2 = this.font.width( "Iterations:" );
    var spinWidth1 = 6 * emWidth;
    var spinWidth2 = 4 * emWidth;

    //

    this.helpLabel = new Label( this );
    this.helpLabel.frameStyle = FrameStyle_Box;
    this.helpLabel.margin = 4;
    this.helpLabel.wordWrapping = true;
    this.helpLabel.useRichText = true;
    this.helpLabel.text = "<b>FixDarkColumns Script</b> - Script to correct  "+
        "columns or rows defects in an image."
    //

    this.colRowTreeBox = new TreeBox( this );
    this.colRowTreeBox.multipleSelection = true;
    this.colRowTreeBox.rootDecoration = false;
    this.colRowTreeBox.setMinSize( 500, 200 );
    this.colRowTreeBox.numberOfColumns = 2;
    this.colRowTreeBox.headerVisible = false;

    this.dialog.colRowTreeBox.canUpdate = false;

    for (var i = 0;i < engine.columns.length; i++)
    {
       var node = new TreeBoxNode(this.dialog.colRowTreeBox);
       node.setText(0,"column");
       node.setText(1,format("%d",engine.columns[i]));
     }
     this.dialog.colRowTreeBox.canUpdate = true;

    for (var i = 0;i < engine.rows.length; i++)
    {
       var node = new TreeBoxNode(this.dialog.colRowTreeBox);
       node.setText(0,"row");
       node.setText(1,format("%d",engine.rows[i]));
     }
     this.dialog.colRowTreeBox.canUpdate = true;

    //

    this.colRowPos_Label = new Label( this );
    this.colRowPos_Label.text = "Column/Row position (px):";
    this.colRowPos_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
    this.colRowPos_Label.minWidth = labelWidth1;

    this.colRow_SpinBox = new SpinBox( this );
    this.colRow_SpinBox.minValue = 0;
    this.colRow_SpinBox.maxValue = Math.max(engine.targetView.image.height - 1,engine.targetView.image.width - 1);
    this.colRow_SpinBox.value = engine.position ;
    this.colRow_SpinBox.setFixedWidth( spinWidth1 );
    this.colRow_SpinBox.toolTip = "Column or Row position";

    this.iterations_Label = new Label( this );
    this.iterations_Label.text = "Iterations:";
    this.iterations_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
    this.iterations_Label.minWidth = labelWidth2;

    this.iterations_SpinBox = new SpinBox( this );
    this.iterations_SpinBox.minValue = 1;
    this.iterations_SpinBox.maxValue = 20;
    this.iterations_SpinBox.value = engine.iterations ;
    this.iterations_SpinBox.setFixedWidth( spinWidth2 );
    this.iterations_SpinBox.toolTip = "Number of iterations";

    this.colRow_SpinBox.onValueUpdated = function( value )
    {
        engine.position = value;
    };

    this.iterations_SpinBox.onValueUpdated = function( value )
    {
        engine.iterations = value;
    };


    this.colRow_Sizer = new HorizontalSizer;
    this.colRow_Sizer.spacing = 6;
    this.colRow_Sizer.add( this.colRowPos_Label );
    this.colRow_Sizer.add( this.colRow_SpinBox );
    //this.colRow_Sizer.addStretch();
    this.colRow_Sizer.add( this.iterations_Label );
    this.colRow_Sizer.add( this.iterations_SpinBox );
    this.colRow_Sizer.addStretch();

    // Type of defect: label
    this.typeOfDefectLab = new Label (this);
    with (this.typeOfDefectLab) {
        text = "Type of Defect:";
        textAlignment = TextAlign_Right | TextAlign_VertCenter;
        minWidth = labelWidth1;
    }
    // Type of defect: radio buttons
    this.typeOfDefectCol = new RadioButton (this);
    with (this.typeOfDefectCol) {
        text = "Column";
        checked=true;
        onCheck = function(checked) {
            engine.fixColumn = checked;
        }
    }

    this.typeOfDefectRow = new RadioButton (this);
    with (this.typeOfDefectRow) {
        text = "Row";
        onCheck = function(checked) {
            engine.fixRow = checked;
        }
    }

    // mask blur method: sizer
    this.typeOfDefectSize = new HorizontalSizer (this);
    with (this.typeOfDefectSize) {
        spacing = 16;
        add (this.typeOfDefectLab);
        add (this.typeOfDefectCol);
        add (this.typeOfDefectRow);
        addStretch();
    }

    //

    this.addButton = new PushButton( this );
    this.addButton.text = " Add ";

    this.addButton.onClick = function() {
       this.dialog.colRowTreeBox.canUpdate = false;
       if(engine.fixColumn) {
           var isDone = false;
           for(var i=0;i<engine.columns.length;++i)
                if(engine.position==engine.columns[i]) isDone = true;
           if(!isDone) {
               var node = new TreeBoxNode(this.dialog.colRowTreeBox);
               node.setText(0,"column");
               node.setText(1,format("%d",engine.position));
               engine.columns.push(engine.position);
               engine.doColumns = true;
           }
       } else {
           var isDone = false;
           for(var i=0;i<engine.rows.length;++i)
               if(engine.position==engine.rows[i]) isDone = true;
           if(!isDone) {
               var node = new TreeBoxNode(this.dialog.colRowTreeBox);
               node.setText(0,"row");
               node.setText(1,format("%d",engine.position));
               engine.rows.push(engine.position);
               engine.doRows = true;
           }
       }
       this.dialog.colRowTreeBox.canUpdate = true;
       CheckButtonStatus(this.dialog);

    };

    this.removeButton = new PushButton( this );
    this.removeButton.text = " Remove ";
    this.removeButton.onClick = function() {

      engine.columns.length = 0;
      engine.doColumns = false;
      engine.rows.length = 0;
      engine.doRows = false;
      for ( var i = 0; i <this.dialog.colRowTreeBox.numberOfChildren; i++ )
      {
         console.writeln("i=" + i);
         if ( !this.dialog.colRowTreeBox.child( i ).selected )
         {
            if(this.dialog.colRowTreeBox.child(i).text(0)=="column")
            {
               engine.columns.push(parseInt(this.dialog.colRowTreeBox.child(i).text(1)));
               engine.doColumns=true;
            }
            else
            {
               engine.rows.push(parseInt(this.dialog.colRowTreeBox.child(i).text(1)));
               engine.doRows = true;
            }
         }

      }
      //Empty tree
      for (var i = this.dialog.colRowTreeBox.numberOfChildren; i >= 0; --i) this.dialog.colRowTreeBox.remove(i);

      this.dialog.colRowTreeBox.canUpdate = false;
      for(var i = 0; i < engine.columns.length; i++)
      {
         var node = new TreeBoxNode(this.dialog.colRowTreeBox);
         node.setText(0,"column");
         node.setText(1,format("%d",engine.columns[i]));
      }
      for(var i = 0; i < engine.rows.length; i++)
      {
         var node = new TreeBoxNode(this.dialog.colRowTreeBox);
         node.setText(0,"row");
         node.setText(1,format("%d",engine.rows[i]));
      }

      this.dialog.colRowTreeBox.canUpdate = true;
      CheckButtonStatus(this.dialog);

    };

    this.clearButton = new PushButton( this );
    this.clearButton.text = " Clear ";
    this.clearButton.onClick = function()
    {
      for (var i = this.dialog.colRowTreeBox.numberOfChildren; i >= 0; --i) this.dialog.colRowTreeBox.remove(i);
      engine.columns.length = 0;
      engine.doColumns = false;
      engine.rows.length = 0;
      engine.doRows = false;
      CheckButtonStatus(this.dialog);

    }

    this.addRemButtonsSizer = new HorizontalSizer;
    this.addRemButtonsSizer.spacing = 4;
    this.addRemButtonsSizer.add( this.typeOfDefectSize );
    this.addRemButtonsSizer.addStretch();
    this.addRemButtonsSizer.add( this.addButton );
    this.addRemButtonsSizer.add( this.removeButton );
    this.addRemButtonsSizer.add( this.clearButton );

    //

    this.colRowGroupBox = new GroupBox( this );
    this.colRowGroupBox.title = "Defects to correct:";
    this.colRowGroupBox.sizer = new VerticalSizer;
    this.colRowGroupBox.sizer.margin = 4;
    this.colRowGroupBox.sizer.spacing = 4;
    this.colRowGroupBox.sizer.add( this.colRowTreeBox, 100 );
    this.colRowGroupBox.sizer.add( this.colRow_Sizer );
    this.colRowGroupBox.sizer.add( this.addRemButtonsSizer );

    //

    this.save_Button = new PushButton( this );
    this.save_Button.text = " Save ";

    this.save_Button.onClick = function()
    {
        var saveFile = new SaveFileDialog;
        if(saveFile.execute()) {
            var fileName = saveFile.fileName;
            var f = new File;
            f.createForWriting(fileName);
            f.write(engine.columns.length,DataType_UInt16);
            console.writeln("Number of columns saved: " + engine.columns.length);
            if(engine.columns.length != 0)
               f.write(engine.columns,DataType_Int32);

            f.write(engine.rows.length,DataType_UInt16);
            console.writeln("Number of rows saved: " + engine.rows.length);
            if(engine.rows.length != 0)
               f.write(engine.rows,DataType_Int32);

            f.write(engine.iterations,DataType_UInt16);
            console.writeln("Number of iterations saved: " + engine.iterations);
            f.close();
        }
    };
    //

    this.load_Button = new PushButton( this );
    this.load_Button.text = " Load ";



    this.load_Button.onClick = function()
    {

        var loadFile = new OpenFileDialog;

        if(loadFile.execute()) {
            var fileName = loadFile.fileName;
            var f = new File;

            f.openForReading(fileName);

            for (var i = this.dialog.colRowTreeBox.numberOfChildren; i >= 0; --i) this.dialog.colRowTreeBox.remove(i);

            engine.columns.length = 0;
            engine.doColumns = false;

            var size = f.read(DataType_UInt16,1);
            if(size!=0) {
                engine.doColumns = true;
                if(size!=1) engine.columns = f.read(DataType_Int32,size);
                else        engine.columns.push(f.read(DataType_Int32,size));
                this.dialog.colRowTreeBox.canUpdate = false;
                for (var i = 0;i<size; i++) {
                    var node = new TreeBoxNode(this.dialog.colRowTreeBox);
                    node.setText(0,"column");
                    node.setText(1,format("%d",engine.columns[i]));
                }
                this.dialog.colRowTreeBox.canUpdate = true;
            }

            console.writeln("Number of columns read: " + engine.columns.length);

            engine.rows.length = 0;
            engine.doRows = false;

            size = f.read(DataType_UInt16,1);
            if(size!=0) {
                engine.doRows = true;
                if(size!=1) engine.rows = f.read(DataType_Int32,size);
                else        engine.rows.push(f.read(DataType_Int32,size));
                this.dialog.colRowTreeBox.canUpdate = false;
                for (var i = 0;i<size; i++) {
                    var node = new TreeBoxNode(this.dialog.colRowTreeBox);
                    node.setText(0,"row");
                    node.setText(1,format("%d",engine.rows[i]));
                }
                this.dialog.colRowTreeBox.canUpdate = true;
            }
            console.writeln("Number of rows read: " + engine.rows.length);

            size = f.read(DataType_UInt16,1);
            if(size != 0)
            {
              engine.iterations = parseInt(size);
              this.dialog.iterations_SpinBox.value = engine.iterations ;
            }

            f.close();
        }

        CheckButtonStatus(this.dialog);

    };


    //

    this.ok_Button = new PushButton( this );
    this.ok_Button.text = " OK ";

    this.ok_Button.onClick = function()
    {
        this.dialog.ok();
    };

    this.cancel_Button = new PushButton( this );
    this.cancel_Button.text = " Cancel ";

    this.cancel_Button.onClick = function()
    {
        this.dialog.cancel();
    };

   this.newInstanceButton = new ToolButton(this);
   this.newInstanceButton.icon = ":/process-interface/new-instance.png";
   this.newInstanceButton.toolTip = "New Instance";
   this.newInstanceButton.onMousePress = function ()
   {
      this.hasFocus = true;

      engine.exportParameters();

      this.pushed = false;
      this.dialog.newInstance();
   };

    this.buttons_Sizer = new HorizontalSizer;
    this.buttons_Sizer.spacing = 4;
    this.buttons_Sizer.add( this.newInstanceButton );
    this.buttons_Sizer.add( this.load_Button );
    this.buttons_Sizer.add( this.save_Button );
    this.buttons_Sizer.addStretch();
    this.buttons_Sizer.add( this.ok_Button );
    this.buttons_Sizer.add( this.cancel_Button );

    //

    this.sizer = new VerticalSizer;
    this.sizer.margin = 6;
    this.sizer.spacing = 6;
    this.sizer.add( this.helpLabel );
    this.sizer.addSpacing( 4 );
    this.sizer.add( this.colRowGroupBox );
    this.sizer.add( this.buttons_Sizer );

    this.windowTitle = "FixLines Script";
    this.adjustToContents();
    this.setFixedSize();

   CheckButtonStatus(this);

}

// Our dialog inherits all properties and methods from the core Dialog object.
FixColumnDialog.prototype = new Dialog;

function CheckButtonStatus(sender)
{
   sender.save_Button.enabled = sender.dialog.colRowTreeBox.numberOfChildren > 0;
   sender.ok_Button.enabled = sender.dialog.colRowTreeBox.numberOfChildren > 0;
   sender.removeButton.enabled = sender.dialog.colRowTreeBox.numberOfChildren > 0;
   sender.clearButton.enabled = sender.dialog.colRowTreeBox.numberOfChildren > 0;
}

function FixColumn( image, col, channel)
{
   if(col == 0)
      col = 1;
    image.selectedChannel = channel;
    for ( var y = 0; y < image.height; ++y )
    {
       image.setSample( (image.sample( col-1, y, channel ) + image.sample( col+1, y , channel ))/2, col, y , channel );
    }
}

function FixRow( image, row, channel)
{
   if(row == 0)
      row = 1;
    image.selectedChannel = channel;
    for ( var x = 0; x < image.width; ++x )
        image.setSample( (image.sample( x, row-1, channel ) + image.sample( x , row+1, channel ))/2, x, row, channel );
}

function fixLinesEngine() {
   var view = engine.targetView;
   var image = engine.targetView;

   with (view) {
       var isGray = image.colorSpace==ColorSpace_Gray;
       console.writeln("iterations: " + engine.iterations);
       
       for(var ii = 1 ; ii <= engine.iterations; ++ii)
       {
          if(engine.doColumns) {
              if(isGray) {
                  for(var i=0;i<engine.columns.length;++i) {
                     FixColumn(image, engine.columns[i], 0);
                  }
              } else {
                  for(var i=0;i<engine.columns.length;++i) {
                      FixColumn(image,engine.columns[i], 0);
                      FixColumn(image,engine.columns[i], 1);
                      FixColumn(image,engine.columns[i], 2);
                  }
              }
          }
          if(engine.doRows) {
              if(isGray) {
                  for(var i=0;i<engine.rows.length;++i) {
                      FixRow(image, engine.rows[i], 0);
                  }
              } else {
                  for(var i=0;i<engine.rows.length;++i) {
                      FixRow(image,engine.rows[i], 0);
                      FixRow(image,engine.rows[i], 1);
                      FixRow(image,engine.rows[i], 2);
                  }
              }
         }
      }

   }
}

/*
 * Script entry point.
 */
function main()
{
   // If the script is being executed as a Script instance on a view context,
   // then apply it and exit, without showing any graphical user interface.
   // This allows us to run a script just as a regular (module-defined) process
   // instance.
     if ( Parameters.isViewTarget )
   {
      engine.apply();
      return;
   }
#ifndef __DEBUG__
   console.hide();
#endif

   // If the script is being executed either directly or in the global context,
   // then we need a target view, so an image window must be available.
   if ( !engine.targetView )
   {
      var msg = new MessageBox( "There is no active image window!",
                                (#TITLE + " Script"), StdIcon_Error, StdButton_Ok );
      msg.execute();
      return;
   }
   var dialog = new FixColumnDialog();
   for ( ;; )
   {
      // Execute the FixColumnDialog dialog.
      if ( !dialog.execute() )
         break;
      // A view must be selected.
      if ( engine.targetView.isNull )
      {
         var msg = new MessageBox( "You must select a view to apply this script.",
                                   (#TITLE + " Script"), StdIcon_Error, StdButton_Ok );
         msg.execute();
         continue;
      }
      // Perform the FixColumns routine.
      engine.apply();
      // Quit after successful execution.
      break;
   }
}

main();

// ****************************************************************************
// EOF



Regards

Mats

5
PCL and PJSR Development / Reset script
« on: 2014 March 11 01:23:40 »
I am trying my hand on writing some scripts and per instructions I start by browsing the existing scripts.
If I compile and run one script it is OK. If I then try to open an other script and run that one it still runs the first script. Even if it is not open in the editor.

What am I missing?

r

Mats

6
General / HowTo. Remove dark column with PixelMath
« on: 2014 March 10 12:13:01 »
I would like to share a method I came up with to fix dark columns that calibration/cosmetic correction did not take care of.
See pic1 upper right corner.
Pic6 is a blowup of the column and we can see that it is not a straight column. I guess that's why CC and calibration did not catch it.

What I like to do is replace all darker pixels in that specific area with a value that is the same as the median of the background. I start by making a small preview of only background (pic2) and then dragging that to the desktop, creating a new image from it.

Open PixelMath and in the first field enter
Code: [Select]
iif(x() > UpLeft && x() < UpRight && $T >= BadLow && $T <= BadHigh ,Target,$T)In the field Symbols enter
Code: [Select]
UpLeft = 26, UpRight = 30, BadLow = 0.0016, BadHigh = 0.0018, Target = med(green_DBE_DBE_Preview01)
The text in the Symbols field are parameters.
UpLeft : Left border of area to fix
UpRight : Right border of area to fix
BadLow: Lower value of pixels to fix
BadHigh: Upper value of pixels to fix
Target: median value of preview

You need to zoom in on the image and use the Readout to find the 2 x-values. On both side of the bad column. Also use Readout to find the K-value of the pixel you like to fix. In my case it was 0.0017 so I choose 0.0016 and 0.0018 as low and high value.

Then you just drag the process icon on the image and all pixels between UpLeft and UpRight that are value between 0.0016 and 0.0018 will be replaced with the median value.

I managed to fix almost all dark pixels as you can see in pic4.

The process can be improved if we would add also Y-values and thus further restrict where the correction will take place.
Note: If you have a proper dark column ie. all pixels at same Y-value then this will not work OK. All the dark pixels will have the median value and you will end up with a new column, only lighter.
To fix this we would could use a small random value on the median but I did not find any such function in Pixelmath.

I like this function. I will try to make it in to a script so I could use previews for selecting waht area to work.

To be continued...

regards

Mats

7
General / Yet Another DBE-question
« on: 2014 March 09 08:05:19 »
I finally got some RGB from my white whale NGC 5033.
In the green channel (pic 1) there is a very visible gradient.

Okay, DBE to the rescue. There seems to be two schools on how to place the samples. One says I should place a few and other says I should plaster the image with them but avoiding stars and galaxies/nebulas.

If I have a gradient like this one. With a brighter part in lower left quadrant. How do I place the the samples? On the brighter part mostly? Or some there and some on the darker parts?

With this one I get the best result if I plaster the thing with samples. Which is basically what AutomaticBackgroundExtraction seem to do.

I really, really miss the reference documentation on this function. And what is the deal with the symmetry checkboxes? When do I use them?

If someone else also don't have a life on a Sunday afternoon I would really appreciate some pointers. I have read a LOT of threads/tutorials on this function but most seem to say that I should try till it looks OK.
A bit of background info would help. What is happening under the hood?

regards

Mats

8
General / Mosaic from non overlapping images
« on: 2014 March 07 00:52:23 »
I have been looking at images from Hubble legacy archive.

A lot of the images are split in the middle like the one shown here.

I have read up on StarAlignment and Imagesolving but it seems it can not solve this frame. Is it at all possible to make a mosaic of such an image as this using PI? Or should I give up and use PS?

regards

Mats

9
Gallery / NGC 4321.... by Hubble
« on: 2014 March 05 10:49:34 »
Decided to trawl the Hubble Legacy Archive while waiting for clear skies.




v2

Maybe a bit over the top....


Fire away!

regards

Mats

Ps. Many thanks to member Josh Lake for advice on how to understand the HLA

10
General / Calibration question... calling all gurus
« on: 2014 March 02 23:10:29 »
Hi.
This is most likely a FAQ but I can not find the answer. So please, someone....
A short recap: I do not have a scope so I use the iTelescope.net rent-a-scope system. This image of NGC5033 was taken with this equipment. http://www.itelescope.net/telescope-t21

I attach a screenshot with four images. The master flat (made by BPP-script), an integrated image made with the masters from iTelescope but calibrated with PI, an integrated image made from frames calibrated by iTelescope and a frame integrated from frames calibrated with PI-made masters.
From upper left:
1. Flat frame
2. Calibrated with PI with iTelescope masters
3. Calibrated by iTelescope
4. Calibrated with PI, with masters made with PI

To my untrained eye it looks like the calibration is off. In upper right it looks like the vignetting from the master flat is still present. Lower right is flatter but there are streaks in picture. Same streaks can be found on the master flat. Lower left picture looks flattest except the left and upper bright stars where the sky is brighter.

I can of course try to correct this with DBE but I feel I have not made an optimal calibration yet. And it bugs me.

All files can be found at the link below.
https://www.dropbox.com/sh/u4y8lzb01lxo1qw/TxOWnfBSZ0

I promise a beer to anyone who can shed some light on this. I have sent a request to PI support but so far no reply.

Best regards

Mats

11
General / Missing videos and articles. Broken links
« on: 2014 February 28 11:42:45 »
There seems to be alot of broken links in the forum now. Many links to tutorials and videos gives a 404 error on Pixinsight site. Among others, Vicent Peris tutorial on calibration, can no longer be found. Is this because of the site update and can we except to get the links and videos working again?

example

http://www.pixinsight.com/tutorials/master-frames/en.html
http://pixinsight.com/videos/NGC1808LRGB-vperis/en.html

 
regards

Mats

12
General / Image calibration. Tests run
« on: 2014 February 25 12:53:10 »
I have run same 17 frames 5 times with the ImageCalibrator.

Every time I get same result.
About half gets the ** Warning: No correlation between the master dark and target frames (channel 0).

Code: [Select]
ImageCalibration: Global context

Loading master calibration frames:
Loading calibration frame image:
C:/Users/mats/Desktop/Astrofoto/NGC_5033/master_bias.fit
Reading FITS: 16-bit integers, 1 channel(s), 3072x2048 pixels: done
* Subtracting pedestal keyword 'PEDESTAL': -100.0000 DN
Loading calibration frame image:
C:/Users/mats/Desktop/Astrofoto/NGC_5033/master_dark.fit
Reading FITS: 16-bit integers, 1 channel(s), 3072x2048 pixels: done
* Subtracting pedestal keyword 'PEDESTAL': -100.0000 DN
Loading calibration frame image:
C:/Users/mats/Desktop/Astrofoto/NGC_5033/master_flat.fit
Reading FITS: 16-bit integers, 1 channel(s), 3072x2048 pixels: done
* Subtracting pedestal keyword 'PEDESTAL': -100.0000 DN

Calibrating target frame 1 of 17
Loading target frame:
C:/Users/mats/Desktop/Astrofoto/NGC_5033/test/T21-bianry-NGC5033-20140222-023844-Luminance-BIN1-E-180-001.fit
Reading FITS: 16-bit integers, 1 channel(s), 3072x2048 pixels: done

Calibrating target frame 2 of 17
Loading target frame:
C:/Users/mats/Desktop/Astrofoto/NGC_5033/test/T21-bianry-NGC5033-20140222-024202-Luminance-BIN1-E-180-002.fit
Reading FITS: 16-bit integers, 1 channel(s), 3072x2048 pixels: done

Writing output file: C:/Users/mats/Desktop/Astrofoto/NGC_5033/test/T21-bianry-NGC5033-20140222-023844-Luminance-BIN1-E-180-001_c.fit
Dark scaling factors:
k0 = 0.000
** Warning: No correlation between the master dark and target frames (channel 0).
Gaussian noise estimates:
s0 = 3.317e-004, n0 = 0.876 (MRS)
** Warning: Overwriting already existing file.
Writing FITS image: 32-bit floating point, 1 channel(s), 3072x2048 pixels: done

Writing output file: C:/Users/mats/Desktop/Astrofoto/NGC_5033/test/T21-bianry-NGC5033-20140222-024202-Luminance-BIN1-E-180-002_c.fit
Dark scaling factors:
k0 = 0.018
Gaussian noise estimates:
s0 = 3.269e-004, n0 = 0.870 (MRS)
** Warning: Overwriting already existing file.
Writing FITS image: 32-bit floating point, 1 channel(s), 3072x2048 pixels: done

File ....-001.fit always fails and ...-002.fit always passes.

https://www.dropbox.com/s/um2nsg4jy8sdkq2/master_dark.fit
https://www.dropbox.com/s/b8hy75zo7oo2y60/T21-bianry-NGC5033-20140222-023844-Luminance-BIN1-E-180-001.fit
https://www.dropbox.com/s/rlyzh7wr4id8a52/T21-bianry-NGC5033-20140222-024202-Luminance-BIN1-E-180-002.fit

If someone smarter than me could take a look and inform me what the problem is. Is it the light frame(s) or the dark?

Any help appreciated.

Mats

13
General / Introduction and request for help
« on: 2014 February 25 10:05:59 »
Hi all.
I have been lurking here for about two weeks so I felt it was about time to step forward. And I need help....

A bit of background:
I am from Finland, 52 years, work as an IT-professional, write programs as a hobby and have been photographing my whole life. I even have my analog darkroom up and running.

Have been contemplating deep sky photography for a year but the cost of good equipment has been a hindrance. And I live in Finland. In the summer there is light around the clock and in the winter the sky is cloudy. There is a 2 month window in the autumn where you can really enjoy the stars.

A month ago I found iTelescope.net where you can rent a scope and just pay for the time. Just what I was looking for.
Have been taking some pictures just for practice.

A fellow astrophotographer recommended Pixinsight and I downloaded a trial license 2 weeks ago. Since then I have done nothing else it seems than learning this software. I consider myself fairly good at learning new programs but this one must have the steepest learning curve I have ever come across. And I have enjoyed every minute of it. I like the fact that it is NOT a set of procedures for doing this or that but a whole toolbox full of new, fantastic tools with names that no one can pronounce. Or remember. Thanks to Harry's Astroshed and Herr Wechselberger I have started to climb the slope. One cm at a time.

To my question.
Last weekend I took a series of lum-pictures of NGC 5033 with this telescope and camera. http://www.itelescope.net/telescope-t21/ A total of 17 frames. Bin 1. 180 sec each. Dithered.

From the site I can download both calibrated and uncalibrated frames. I will return in a later post to the calibration procedure since I am running in to the dreaded 'Warning: No correlation...' issue when trying to calibrate with raw darks from the site.

I have now used the calibrated frames in the following procedure:
- Cosmetic correction with a master dark.
- Star alignment
- Image integration

The problem I am having is that there is a coulmn of darker pixels at x-pos ~2060. It appears on some frames but not all. See attached pic.
The frames are integrated using Linear fit.

Code: [Select]
Integration of 18 images:
Pixel combination ......... average
Output normalization ...... additive
Weighting mode ............ noise evaluation
Scale estimator ........... iterative k-sigma / BWMV
Range rejection ........... range_low=0.000000 range_high=0.980000
Pixel rejection ........... linear fit clipping
Rejection normalization ... scale + zero offset
Rejection clippings ....... low=yes high=yes
Rejection parameters ...... lfit_low=5.000 lfit_high=2.500

Code: [Select]
Total :   5279729   4.662% (  4142036 +   1137693 =   3.658% +   1.005%)
MRS noise evaluation: done
Computing noise scaling factors: done

Gaussian noise estimates  : 8.9316e-005
Scale estimates           : 1.2412e-004
Location estimates        : 6.5516e-003
SNR estimates             : 9.2485e+003
Reference noise reduction : 1.1752
Median noise reduction    : 1.3163

94.30 s

If I use Winsorized Sigma clipping and pull Sigma low down to 1.000 the column disappears. But the number of rejected pixels go up to 50%.

I am sure there is some way to remove this other than throwing away about 1/3 of the frames where this pattern exists. HELP!!

I have tried a lot of different combinations with Cosmetic Correction but to no avail. I am also not completely clear on how to use the preview on that one.
- use a master dark
- open a frame
- make a Preview
- click Real time preview
- adjust Sigma sliders

How do I know when to stop adjusting? The count of hot pixels keep rising until all turns white. Is 3179 hot pixels a lot on a 6Mpixel frame??? What exactly does Show map do?

If some kind soul would like to take a look at the calibrated, registered, cosmetically corrected and integrated frame there is a link below.
https://www.dropbox.com/s/uwch9l71xd416zs/ngc5033.fit

I hope I am making some kind of sense with this ramble and look forward to learning a lot more.

Best regards

Mats

Pages: [1]