Author Topic: Annotation script  (Read 151955 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Annotation script
« Reply #75 on: 2012 March 31 12:10:10 »

/tmp/stars.csv
*** Error: FileFormat: No installed image file format was found for the specified file extension and access conditions
<* failed *>

yeah, that's a different error than what i'm seeing - for me it just can't solve the image.

i'm hoping that juan can try this script on his osx machine and see what happens for him.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #76 on: 2012 April 02 05:11:30 »
I have a new version of ImageSolver and AnotateImage. This is a beta version since I am not going to add more functionality for now but it still needs more tests.

ImageSolver has the following improvements:
  • The seed coordinates can be found searching an online catalog entering the name or code. ie. "M31", "alnitak", "pgc22344", etc.
AnnotateImage has the following improvements:
  • Buttons for adding, removing and moving layers.
  • Custom catalog layer: It paints the objects stored in a text file with a simple format. The format is specified below.
  • Text layer: It paints a user defined text. It allows the expansion of the following variables:
    • %RA: Right Ascension of the center of the image.
    • %DEC: Declination of the center of the image.
    • %RESOLUTION: Resolution of the image in arcseconds/pixel.
    • %ROTATION: Rotation of the image in degrees.
    • %KEY-XXXX: Prints the value of the FITS keyword XXXX. i.e. %KEY-FOCALLEN is substituted by the value of the keyword FOCALLEN.

The custom catalog format is a text file where each line is a record with fields separated by tabs. The first line must be a header that defines the columns of each record. The available columns are these:
  • RA: (Mandatory) Right ascension in degrees (not hours) (i.e. 225.211545)
  • DEC: (Mandatory) Declination in degrees (i.e. -53.25664)
  • NAME: (Optional) Screen name of the object (i.e. NGC4565)
  • DIAMETER: (Optional) Diameter of the object in arcminutes. If this column doesn't exist or the value is 0, the object is considered as a point.
  • MAGNITUDE: (Optional) Magnitude of the object.
For example:
Code: [Select]
NAME RA DEC DIAMETER MAGNITUDE
2039348 338.5108333 33.81861111 0.83 12.68
2040409 338.630000 33.88083333 0.66 12.81
69218 338.7341667 33.92777778 0.21 11.25
141035 338.9245833 34.26694444 0 11.08
69256 338.966250 33.94527778 0.92 10.54
69260 338.986250 33.96583333 1.12 11.03

The user interface is quite complex and probably there are a few bugs yet. It will be very helpful if somebody tests it trying to find failures.
The javascript engine has an small error when entering spaces in the text layer. I think that Juan is on it: http://pixinsight.com/forum/index.php?topic=4072.0
« Last Edit: 2012 April 03 15:41:13 by Andres.Pozo »

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Annotation script
« Reply #77 on: 2012 April 02 12:12:59 »
Hi

The solver is much improved , worked where it failed before  :-*

The annotation did not remove all duplicates though  >:D

Many Many thanks for your excellent Work

Harry

BTW  Can we lable fainter galaxys ??
Harry Page

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #78 on: 2012 April 02 12:31:47 »
BTW  Can we lable fainter galaxys ??
First you have to find a better catalog than PGC - HYPERLEDA I (http://cdsarc.u-strasbg.fr/viz-bin/Cat?VII/237). Then, there are two options: you can download the area that you need and create a custom catalog or you can point me where to find the catalog so I can analyze if I could integrate it in the script.

Offline Jose Joaquin Perez

  • Newcomer
  • Posts: 41
    • Astrofotografía Austral
Re: Annotation script
« Reply #79 on: 2012 April 02 15:35:31 »
Hi Andrés, how can I do to get the info from others popular catalogues? ( Barnard, van Den Vergh, Caldwell. Cederblab, etc.) ???

Do I need to download some kind of archive?

Thanks for your help.

Best regards,
____________________
José Joaquín Pérez
Rancagua, Chile
www.astro-austral.cl

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #80 on: 2012 April 03 01:34:29 »
Hi Andrés, how can I do to get the info from others popular catalogues? ( Barnard, van Den Vergh, Caldwell. Cederblab, etc.) ???

Do I need to download some kind of archive?

Thanks for your help.

Best regards,
You can try with VizieR. There are several hundreds of catalogs there: http://cdsarc.u-strasbg.fr/viz-bin/Cat. If you find the catalog that you want, then you have to make a custom catalog for the annotation script. For example:
  • Suppose that you want the catalog "VII/233 - 2MASS Extended sources". You have to find it in VizieR and enter in the query page: http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII%2F233
  • In the target field select the coordinates of your image. Select also the columns that you want. For the custom catalog you will need at least the J2000 coordinates.
  • If you want to filter by magnitude or another criteria do it in this page.
  • In the preferences select the output as "ascii text/plain" and the maximum number of records. Press "Submit".
  • Save the result of the query as a file and open it in Excel
  • Using the capabilities of Excel it is usually easy to reformat the results so they are in the format of the custom catalogs of the annotation script.

If the catalog is not in VizieR, then you have to find a source and then reformat it in the same way.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #81 on: 2012 April 03 01:50:38 »
The annotation did not remove all duplicates though  >:D
There are a few things that I have not explained about the duplicates:
  • The script does not remove duplicates inside a catalog. It only removes duplicated objects in different catalogs. The reason for this is: how can I discriminate if two very near objects are a double star or an error in the catalog?. If the catalog creators have not removed two very near objects having more information about them and more computing resources than the script then I think that their decision should be respected.
  • Two objects in different catalogs are considered the same when they are less that 3" apart if both are points or 10" if one of them is an extended object.
  • When removing duplicates the script keeps the object in the first catalog as they are ordered in the list of layers.
Also, some catalogs have lots of errors. The catalogs done by automated means as USNO-B1 and PPMXL usually have problems discriminating between stars and galaxies and also have many false objects near very bright objects.

Offline Josh Lake

  • PixInsight Old Hand
  • ****
  • Posts: 424
Re: Annotation script
« Reply #82 on: 2012 April 03 08:13:22 »
Andres, this is amazingly useful, thank you so much. Scripts like these will be very good for my astronomy classes as they work to find stars in a field and do calculations.

I noted that HIP stars are listed in the Cross Index for the Named Stars, but with only 3690 stars in the catalog, it's obviously only using HIP stars that also have names.

I'm working on getting it to display all HIP stars, so I'm working with the Vizier index as per your instructions on the previous page. Rather than getting it to just look at my specific field using the WCS coordinates, can I just download and use the entire HIP catalog as a custom?

Thanks again!

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #83 on: 2012 April 03 08:25:41 »

I'm working on getting it to display all HIP stars, so I'm working with the Vizier index as per your instructions on the previous page. Rather than getting it to just look at my specific field using the WCS coordinates, can I just download and use the entire HIP catalog as a custom?

The custom catalogs have not a hard limit on size. However, I don't think that catalogs much bigger than 100,000 records will work.

¿Which VizieR catalog are you using for finding HIP codes? If you are using I/239, this catalog has nearly 120,000 records so perhaps it will work. For downloading the whole catalog you can use the file server instead the query page. For this catalog the url's are:
Description of the catalog
Data
In any case, if this catalog is interesting enough I could add it to the list of supported catalogs.

Offline Josh Lake

  • PixInsight Old Hand
  • ****
  • Posts: 424
Re: Annotation script
« Reply #84 on: 2012 April 03 09:43:34 »
Thanks, Andres.

I pulled a few of the DAT files but have been unable to get the Annotate tool to use them as a custom. Do I need to format the columns by hand? Or does the tool support a format that I'm just not finding yet?

I may work on it by hand anyway -- I only want the brightest of the HIP stars, way under 100,000, just enough to be able to find several bright ones within a 4 degree field. I have no experience with Vizier, so I'm wading in the deep end to try to figure out what I can get and what format will work (like your NGC data included).

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #85 on: 2012 April 03 09:46:09 »
Thanks, Andres.

I pulled a few of the DAT files but have been unable to get the Annotate tool to use them as a custom. Do I need to format the columns by hand? Or does the tool support a format that I'm just not finding yet?
The format is described in this thread a few messages above:
http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257

Offline Josh Lake

  • PixInsight Old Hand
  • ****
  • Posts: 424
Re: Annotation script
« Reply #86 on: 2012 April 03 11:05:57 »
Ah ha! Thanks. I didn't read far enough...  :footinmouth:

I'm going to work on creating my own shorter catalog of bright HIP stars using this format.

HIP stars are interesting (to me, at least) because they have high precision parallax data and can therefore be used to related distance, absolute magnitude, and apparent magnitude, a great exercise for my astronomy classes.

--- Later ---

I had some luck getting what I wanted out of the full Hipparcos catalog and generated a tab-delimited text file using your column naming convention. I got it down to 41,137 entries by restricting it to over 8th magnitude.

However, the script doesn't load any of them. It says, "Custom catalog size: 0 objects." So obviously I'm doing something wrong. It seems to be formatted the same as your custom NGC txt file.

Any ideas? Here is the file: http://db.tt/CffQDSeK  (1.5 MB)

« Last Edit: 2012 April 03 11:39:47 by jlake »

Offline slang

  • Member
  • *
  • Posts: 60
Re: Annotation script
« Reply #87 on: 2012 April 03 13:25:34 »
Hey.

Big ups to the devs of these scripts - absolutely AWESOME.

One question - I'm shooting with an EOS450D, and currently using APT to control/capture. The author of that has kindly modified it so that I can get access to pretty much all the variables (or close to...) that I need to pass these onto Pixinsight and I can call a script post-capture and pass these variables to it.

My question is, how do I get the relevant variables (OBJCTRA, OBJCTDEC, FOCALLEN, XPIXSZ, YPIXSZ) into Pixinsight?
Is it possible to use something like exiftool to add this metainfo to the .cr2 files? If so, what is the format of these tags in the metainfo?
Or else, is it possible to list these in a text description file (one file per image, with each piece of information in a standardised format)?

Are any of these possible at present?

Cheers -
--
Mounts: Orion Atlas 10 eq-g, Explore Scientific G11-PMC8
Scopes: GSO RC8, Astrophysics CCDT67, ES FCD100-80, TSFLAT2
Guiding: ST80/QHY OAG/QHY5L-II-M
Cameras: Canon EOS 450D (IR Mod), QHY8L, QHY163m/QHYFW2-US/Astronomik LRGBHaSiiOii

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #88 on: 2012 April 03 15:16:34 »
I had some luck getting what I wanted out of the full Hipparcos catalog and generated a tab-delimited text file using your column naming convention. I got it down to 41,137 entries by restricting it to over 8th magnitude.

However, the script doesn't load any of them. It says, "Custom catalog size: 0 objects." So obviously I'm doing something wrong. It seems to be formatted the same as your custom NGC txt file.

Any ideas? Here is the file: http://db.tt/CffQDSeK  (1.5 MB)
It seems that you are using a Macintosh so your file has lines ending in CR character. The script currently only supports Windows format (CR-LF) or UNIX format (LF). I will modify the script in order to support text files with lines ending in CR.
Meanwhile, you could modify your file to end the lines in CR-LF or LF. In Windows you could use Notepad++, but in Macintosh I can't recommend any software that can do this.

Also, the Right Ascension should be in degrees but in your file seems to be in hours. You have to multiply by 360/24 the values of the RA.
« Last Edit: 2012 April 03 15:33:16 by Andres.Pozo »

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #89 on: 2012 April 03 15:27:43 »
Hey.

Big ups to the devs of these scripts - absolutely AWESOME.

One question - I'm shooting with an EOS450D, and currently using APT to control/capture. The author of that has kindly modified it so that I can get access to pretty much all the variables (or close to...) that I need to pass these onto Pixinsight and I can call a script post-capture and pass these variables to it.

My question is, how do I get the relevant variables (OBJCTRA, OBJCTDEC, FOCALLEN, XPIXSZ, YPIXSZ) into Pixinsight?
Is it possible to use something like exiftool to add this metainfo to the .cr2 files? If so, what is the format of these tags in the metainfo?
Or else, is it possible to list these in a text description file (one file per image, with each piece of information in a standardised format)?

Are any of these possible at present?

Cheers -
If your images don't have the keywords that the script uses, you have to enter them manually. It shouldn't be too complex since the the focal length and the dimensions of the pixels are constant for a tube+camera combination. The coordinates now can be found using the new search dialog.

If you really need to automate the process you need a capture program that can write FITS files with these values. I know that MaximDL can do it and I am sure that other programs can do it too.

I think that Juan has modified the integration of DCRAW to generate some keywords from the values in the RAW files. I think that DATE-OBS and FOCALLEN are supported but I have not tested it.