Annotation script

vicent_peris said:
It would be very nice if you can just type the CDS catalog code.
I also thought of that but it is not easy. Each catalog has different fields for the id of the object and the coordinates. For example, the Tycho catalog uses three fields for storing the object id and the RA is stored in degrees. PGC only needs one field for the id and the RA is in hours. Also, not every catalog has a magnitude field.
Perhaps I could write a generic VizieR layer, but it would be quite involved to use.

Another important option is, IMO, to be able to select a magnitude range, with both lower and upper limits.
This is easy.

And another wonderful option would be to select a list of files so it annotates all of them in a single action.
I have to think about what is the bet way for adding this functionality.
 
troypiggo said:
Andres.Pozo said:
troypiggo said:
Excellent.  Been eagerly waiting this.

One minor comment.  Line 332 of script gives and error, because you've hard-coded the path to ngc2000.txt.  I manually changed it to my path and the script seems to be working fine.  Still running as I type this, the USNO catalog annotation seems to be taking a while to download and have a think about.

So you have to use ImageSolver first to get the WCS coords into image, then run AnnotateImage?

Thank you for pointing me to this error. I have fixed it.

Regarding the USNO catalog, you should try to find which mirror of VizieR works better for you. From Spain, both Strasbourg and Cambridge (UK) work very well and it takes only a few seconds to download the stars. The duplicates removing can be slow when there are lots of stars.

This script uses the WCS coords. You can get them using ImageSolver but also with PinPoint or even Astrometry.net.

Sorry mate.  Got this error:

Code:
run --execute-mode=auto "/Users/troy/Applications/pixinsight/AnnotateImage.js"

Processing script file: /Users/troy/Applications/pixinsight/AnnotateImage.js
*** Error [000]: /Users/troy/Applications/pixinsight/AnnotateImage.js, line 341: Error: File.openForReading(): invalid argument type: String expected.

You have to select the NGC layer and fill the path of the catalog. I will add a check for an empty path and warn the user.
 
Andres,

solver and annotation worked nicely for me. Remarks:

- also ran into the line 341 problem. Maybe the path can default to the path where the script is stored??
- worked nicely on a 85mm image, despite of distortions and a wrongly specified 5.6um pixel size. Loaded the DSLR images with SuperPixels debayering, which joins 4 bayer pixels into one super pixel. Script compensated for this by adjusting focal length to 41.3mm, see screenshot
- I would like to see the ability to change the size of object labels. Currently I can do it only for the grid labels.
- There is a strange cluster of labels at the upper left.
- Spectacular work!  8)

Georg
 

Attachments

  • solver.JPG
    solver.JPG
    373.5 KB · Views: 96
Georg,

I only realised after Andres' last post.  In the window with the different catalogues, by default it seems the grid lines one is highlighted.  If you click on the NGC one for example and look down the bottom, you can change the colours and fonts for that catalogue now.  And hit the down arrow next to the cat path and point it to your ngc2000.txt file will solve the line 341 problem.  ;)
 
Andres.Pozo said:
vicent_peris said:
It would be very nice if you can just type the CDS catalog code.
I also thought of that but it is not easy. Each catalog has different fields for the id of the object and the coordinates. For example, the Tycho catalog uses three fields for storing the object id and the RA is stored in degrees. PGC only needs one field for the id and the RA is in hours. Also, not every catalog has a magnitude field.
Perhaps I could write a generic VizieR layer, but it would be quite involved to use.

Then let the user import his own catalogs as text files with a format imposed by you. It is very easy to import CDS catalogs into a spreadsheet page and modify the original format (if they are not too big).


V.
 
One example more. This is a 10x1 min exposure with a 105 mm lens closed to f/16 and R filter:

Orion_105mm.jpg


It would be very nice if we have:

- Constellation names and lines.
- Bright star catalogs and constellation stars with greek designations.

Regards,
Vicent.
 
Sorry to be a pain, Andres.  Been playing around with it this afternoon.  All seems to work fine as long as the output mode is "annotate image".  When I changed it to overlay, there was something funny in the background.  If I then change output mode back to annotate image, there are strange colours all over the image - despite it being a monochrome Ha image!  See image below.
 

Attachments

  • Screen Shot 2012-03-15 at 5.49.51 PM.jpg
    Screen Shot 2012-03-15 at 5.49.51 PM.jpg
    398.9 KB · Views: 65
troypiggo said:
Sorry to be a pain, Andres.  Been playing around with it this afternoon.  All seems to work fine as long as the output mode is "annotate image".  When I changed it to overlay, there was something funny in the background.  If I then change output mode back to annotate image, there are strange colours all over the image - despite it being a monochrome Ha image!  See image below.
You are not a pain  ;). Instead, you are helping me to finding bugs and problems in the script.

The "Overlay mode" generates a transparent image with the annotation drawn over it. The "something funny in the background" is the chessboard that Pixinsight shows by default in the background of the transparent images. This pattern can be changed at "Edit | Global Preferences | Default Transparency Settings". The overlay mode is intended for generating an image that can be overlapped on the original image using other applications with different capabilities (MS Word, PS, ...).

Both modes generate RGB images in order to be able to use different colors for the annotation. I haven't been able to replicate the strange behavior when you change the mode back to "Annotate image".

I only realised after Andres' last post.  In the window with the different catalogues, by default it seems the grid lines one is highlighted.  If you click on the NGC one for example and look down the bottom, you can change the colours and fonts for that catalogue now.  And hit the down arrow next to the cat path and point it to your ngc2000.txt file will solve the line 341 problem. 
When I designed the dialog I thought that this behavior would be intuitive. Clearly it doesn't. I have to re-think it and make a few changes for adding clues so that the user can discover this more easily.

 
vicent_peris said:
Then let the user import his own catalogs as text files with a format imposed by you. It is very easy to import CDS catalogs into a spreadsheet page and modify the original format (if they are not too big).

I will add this to the TODO list. I used this path for generating the ngc2000.txt file. I imported in Excel a few catalogs from Vizier, joined them and then saved as a text file.

The format will be very simple:
Code:
   RA(deg) <tab> Dec(deg) <tab> Diameter(arcmin) <tab> Name

The user will be responsible of any filtering that he needs.
 
I am working in a new layout for the configuration dialog. The idea is making easier to discover that selecting a layer in the list, the panel at the right changes and shows the configuration of the layer.

What do you think?
 

Attachments

  • Preview v0.2.png
    Preview v0.2.png
    76.4 KB · Views: 121
Andres.Pozo said:
[...The format will be very simple:
Code:
   RA(deg) <tab> Dec(deg) <tab> Diameter(arcmin) <tab> Name
...

Please note the RA is usually in HMS (1h=15 degrees), while Dec in in degrees, arc minutes, arc seconds (d'"). You should also have a field for the type of object (star, nebula, galaxy,...), since you may want to draw them in different styles.

Georg
 
New GUI is looking good. Having the panels side by side suggests that they correspond to each other - which (for me) was not the case in the old layout. The "<=>" symbol is not really necessary-

Georg
 
georg.viehoever said:
Andres.Pozo said:
[...The format will be very simple:
Code:
   RA(deg) <tab> Dec(deg) <tab> Diameter(arcmin) <tab> Name
...

Please note the RA is usually in HMS (1h=15 degrees), while Dec in in degrees, arc minutes, arc seconds (d'"). You should also have a field for the type of object (star, nebula, galaxy,...), since you may want to draw them in different styles.

Georg

Hi Georg,

the RA is not always in hour format. The PGC catalog is in hours, but Tycho-2, PPMXL and USNO-B1.0 are in degrees (with decimal point, not DMS). The new catalog that I am integrating is in HMS format. Since there is not a consensus and the script uses degrees internally I have decided to use degrees in the file.

Also, I think that all the filtering should be done by the person who generates the file. There are lots of different use cases and trying to implement all would be very long. I think that it is a better idea to allow several custom layers which contain only one class of objects. Since it is possible to assign different styles to each layer you can differentiate between object classes.

I only intended to support one custom layer, but after your comments I seems necessary to have more than one.
 
Hi

Sorry being dumb

Get this error

Processing script file: C:/Users/Ian/Desktop/ano/AnnotateImage.js
*** Error [000]: C:/Users/Ian/Desktop/ano/AnnotateImage.js, line 339: Error: Unable to open file: C:/Users/andres/Documents/PCL/ngc2000.txt:

Win32 error (3): The system cannot find the path specified

Help  :)

Harry

Oh sorry should have read the earlier post :eek: :-[
 
Hi

how do I do this

You have to select the NGC layer and fill the path of the catalog. I will add a check for an empty path and warn the user.

Harry
 
Harry page said:
Hi

how do I do this

You have to select the NGC layer and fill the path of the catalog. I will add a check for an empty path and warn the user.

Harry
The file ngc2000.txt is in the .zip that I published. You should have decompressed it when you extracted the script.
Launch the script and select the NGC layer. The panel under the list should have changed and now it should have the settings of the NGC/IC layer.
Press the blue triangle near the path field and select where you saved the file.
 
Hi

Got it thanks , I have a hard day so my brain was not working  >:D

Harry

BTW many thanks for your excellent work
 
Hi,
I had a hard time with the 'empty string' error too, finally had to read all the replies. Otherwise it works fine, many thanks, it is a great script.

A small problem: if you blindly add all catalog on a busy area, PI will block for a very long time trying to remove duplicates. This is due to the algorithm used for finding duplicates. I had to kill PI. May be it could be possible to have a limit on the number of objects annotated (with a default that could be very large, but not to the point of blocking PI in the duplicate search), as a security.  The duplicate algorithm could be enhanced, but I am not sure this is worth it as the annotation become unreadable due to the overloading of text long before the duplicate search time is a serious problem.

Thanks again -- bitli

 
Back
Top