Author Topic: Manipulation XISF properties  (Read 524 times)

Offline kduffill

  • Newcomer
  • Posts: 1
Manipulation XISF properties
« on: 2019 August 11 02:11:12 »
Hi folks, I am very new to PI so please forgive me if this is a 'newbie' question.
I recently took some images with my Canon EOS 1100D camera at the prime focus of a half metre Newtonian with a focal length of 2240 mm.
When the raw images (.CR2 files) are loaded into PI and I look at the FITS Header information it thinks that the focal length is 50.00 mm. That is not really surprising, I guess, how would it know any different?
I can edit the FITS Header to the correct value of 2240.00 mm, I can even add new FITS keywords (for OBJECT, for example). But when I save these images as .xisf files, and look at the beginning of the file in a text editor, I see that the <Property id="Instrument:Telescope:FocalLength" type="Float32" value="0.05"/> still thinks the focal length is 0.05 m (ie 50.00 mm), and there is no mention of the object.
I cannot seem to find a way of looking at the xisf properties in PI itself, so is there a way of examining the xisf properties in the PI GUI? And, perhaps more importantly, is there a way of modifying or adding such properties?
Again, apologies if the answers are simple and I just haven't found them yet. I have tried (honest).

Offline Jkcolli

  • Newcomer
  • Posts: 5
Re: Manipulation XISF properties
« Reply #1 on: 2019 August 11 04:42:41 »
In PI, select File, FITS Header
Select FOCALLEN in the FITS Header window
Edit the Value to change the value of the focal length
Click on Replace
Apply the changes to the image by clicking on the solid square box at the bottom of the FITS header window
Save the image via File, Save

Close the image
Open the image and select File, FITS header and check to see that the change has been made.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Manipulation XISF properties
« Reply #2 on: 2019 August 11 05:17:25 »
Quote
I cannot seem to find a way of looking at the xisf properties in PI itself, so is there a way of examining the xisf properties in the PI GUI?

The View Explorer window shows all image properties. Right-click on the image and select Load View Explorer. Scroll down the information panel to inspect all properties under the properties tree item. If you wish, right-click the information panel and select View as Text. This allows you to explore all view properties as plain text.

Quote
And, perhaps more importantly, is there a way of modifying or adding such properties?

A new Property Explorer window will be available a future release. At present you can do this very easily with a little of JavaScript from the Process Console window.

- Select the image you want to work with.

- Open the Process Console window and enter the following command:

j var view = ImageWindow.activeWindow.mainView;

- Example 1: To print a list of all image properties:

j view.properties.join( '\n' );

- Example 2: To inspect the value of the standard "Instrument:Telescope:FocalLength" XISF property:

j view.propertyValue( "Instrument:Telescope:FocalLength" );

- Example 3: To modify the value of the same property:

j view.setPropertyValue( "Instrument:Telescope:FocalLength", 0.05 );

- Example 4: To define a new property that will be stored when the image is saved to a disk file (in XISF format):

j view.setPropertyValue( "Testing:FooBar", 123.456, 0, 128 );

- Example 5: To remove an existing property:

j view.deleteProperty( "Testing:FooBar" );

I hope this helps. Let me know if you need more information.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/