Author Topic: Annotation script  (Read 151999 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Annotation script
« Reply #120 on: 2012 April 05 05:10:05 »
Quote
Simply check if there is a layer in the registry which constructor is the same as the parameter value.

Whenever you call eval(), you have to be very careful. A secure way to validate the semantics of a parameter as code to be executed is tokenizing it and check that it contains only tokens pertaining to a valid dictionary. In your case, the dictionary could be:

var validTokens = [ "new", "(", ")", ";", "GridLayer", "CatalogLayer", "NamedStarsCatalog", "NGCICCatalog", "TychoCatalog", "PGCCatalog" ];

Then if an executable parameter has anything else, you should open a message box with green flashing text and a red background :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #121 on: 2012 April 05 06:15:14 »
Juan, please check this version.
It still uses eval, but it does not eval code from outside the script. The construction of layers should be as secure as the script itself.

If you think this is still not admissible, the solution would be the "big switch".

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Annotation script
« Reply #122 on: 2012 April 05 07:06:42 »
Hi Andrés,

Yes, I think this version is secure. Using eval() this way does not compromise the platform.

Now you just have to fix the UI. When the script is launched without parameters, the list of layers is empty and hence the right panel of layer parameters doesn't get the correct geometry. This should be easy to fix though.

This script is a jewel. Very nice work! :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #123 on: 2012 April 05 12:52:11 »
New version:
  • Layer management fixed. The delete button didn't work as expected.
  • Security fix in parameters persistence
  • Layout fixed when there are no layers

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Annotation script
« Reply #124 on: 2012 April 05 13:59:30 »
Hi!
The Annotaion script is really great work!!!
And its very easy to use!!! The first try after downloading the script without changing any parameter
and using our NGC4236 image looked like that:

Large version under:
http://www.werbeagentur.org/oldwexi/fotos/bunt_annotated_crop.jpg

I like this new feature. Thanks. In my opinion this script is a masterpiece!


Aloha
Gerald

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Annotation script
« Reply #125 on: 2012 April 07 13:05:41 »
Hi Andres!

One more tool, which makes PI unique!
It works great and has a easy handling.
Thank you very much for this useful tool.


But now I'm getting 'hungry' (and I hope, the tool isn't finished yet).

1) STARS

In the example below, there is just one star marked - mag11.3, spec F8

Is it possible to notify more stars (additional catalogs) and the magnitude and spectraltype, respectively the B-V Index for the stars.
All of them should be optionally.

2) DEEP SKY OBJECTS

In this field are many weak galaxies and Zwicky Clusters - could the marked as well?

Sorry for my 'dorty' questions for more ...

Best regards
Herbert, Austria


Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #126 on: 2012 April 07 13:10:44 »
[...]
1) STARS
Have you tried to add a layer of UCAC3, PPMXL or USNOB-1 catalogs? These catalogs have up to 1000 million of stars.

Quote
2) DEEP SKY OBJECTS
If you find in Vizier a better catalog for deep sky objects, please send me its name so I can analyze it.

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Annotation script
« Reply #127 on: 2012 April 07 13:20:15 »
Hi Andres!

Quote
Have you tried to add a layer of UCAC3, PPMXL or USNOB-1 catalogs? These catalogs have up to 1000 million of stars.

No idea, how it works - sorry!

Quote
If you find in Vizier a better catalog for deep sky objects, please send me its name so I can analyze it.

OK - but it takes a little bit.

Thank you and best reards.

Herbert, Austria

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #128 on: 2012 April 07 13:22:56 »
Hi Andres!

Quote
Have you tried to add a layer of UCAC3, PPMXL or USNOB-1 catalogs? These catalogs have up to 1000 million of stars.

No idea, how it works - sorry!
Push the "green plus" button under the list of layers and select the catalog that you want. USNOB-1 and PPXML have stars up to 20 magnitude.

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Annotation script
« Reply #129 on: 2012 April 07 13:26:46 »
Hi Andres!

Uuups - sorry - I didnt notice the buttons.

Thank you.

Herbert, Austria

Offline Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 274
  • Resistance is futile.
    • Astronomí­a Sur
Re: Annotation script
« Reply #130 on: 2012 April 07 18:16:06 »
Hi guys,

I have formated a catalog of LONEOS photometry to be used on Annotation script, can be found in the PixInsight File System, inside /Annotation_Script_Catalogs folder:

http://endor.uv.es/files/?goto=forum-shared-files%2FAnnotation_Script_Catalogs%2FLONEOS_photometry.zip

This catalog is a compilation of photometry of particular areas of the sky, usually in the vicinity of important objects. More information:

Readme: ftp://ftp.lowell.edu/pub/bas/starcats/loneos.ReadMe
Original data: ftp://ftp.lowell.edu/pub/bas/starcats/loneos.phot

I've tested with Messier 50 area, see attached image (orange magnitudes)

Thanks Andres for all the great work! :)

Best regards,

Enzo.

EDIT: 8/04/2014 - Updated Endor URL.
« Last Edit: 2014 April 07 22:26:03 by Enzo De Bernardini »

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 204
    • Skypixels - Astrophotography by Herbert Walter
Re: Annotation script
« Reply #131 on: 2012 April 08 00:21:34 »
Hi Enzo!

Perfect!

Quote
I have formated a catalog of LONEOS photometry to be used on Annotation script, can be found in the PixInsight File System, inside /Annotation_Script_Catalogs folder:

http://endor.uv.es//data/public/f38f0f2c742b3590290c90af7a5a6f64.php?lang=en

Message:  Cannot find file!


Kind regrads.

Herbert, Austria


Offline avastro

  • PixInsight Addict
  • ***
  • Posts: 181
    • http://astrosurf.com/avastro/
Re: Annotation script
« Reply #132 on: 2012 April 08 02:08:07 »
Antoine
Lentin Observatory
http://www.astrosurf.com/avastro/

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: Annotation script
« Reply #133 on: 2012 April 08 03:22:23 »
With all this new library capabilities, would be very cool to use it to annotate G2V stars etc to locate them for calibration etc.  Anyone with the skills to do so able to come up with something like that?  :)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #134 on: 2012 April 08 03:54:48 »
With all this new library capabilities, would be very cool to use it to annotate G2V stars etc to locate them for calibration etc.  Anyone with the skills to do so able to come up with something like that?  :)
The catalog I/259 of Vizier has the spectral type of the Hipparcos stars. In this catalog there are 691 G2V stars. You can download the raw catalog using the file server of Vizier and filter it for making a custom catalog. You can also filter the catalog using Vizier so you have to process less stars.

Perhaps in a future version I could add the capability of filtering Vizier catalogs using a custom expression. This can be done, but it will be a functionality only for advanced users since it will require that the user would be able to find in Vizier the name of the fields and write the filter expression.