PixInsight Forum (historical)
Software Development => New Scripts and Modules => Topic started by: Andres.Pozo on 2012 March 08 07:11:59
-
I am writing a new script related to the Plate-Solving (http://pixinsight.com/forum/index.php?topic=3911.msg27130#msg27130) script that I wrote the last week. It will annotate images that have coordinates in the WCS convention.
The annotation will be designed by layers:
- Objects: It will use a catalog with nearly 10000 objects from the NGC and IC catalogs and it will draw a circle around the object and write a label with the catalog number and name of the object.
- Grid: the script will draw a grid with the equatorial coordinates of the image.
The user will be able to decide which layers and elements wants to draw. The graphics properties (color, transparency, line width,...) will be configurable.
I already have the kernel of the script, but I still haven't written the user interface. The annotation will be something like the attached image (the image is from gvanhau (http://pixinsight.com/forum/index.php?topic=3822.msg26540#msg26540)). New ideas will be welcome.
Latest version
This message will be kept updated with the latest versions of the scripts:
- ImageSolver v1.6
- AnnotateImage v1.2
-
Cool! Astrometry.net does that too but their object list is rather short. It would be great if you could 'open' the catalog format so we can add arbitrary catalogs. I'm thinking the PGC would be nice for galaxy peepers. Alternatively you could do away with the catalogs and do an online SIMBAD search instead.
-
Alternatively you could do away with the catalogs and do an online SIMBAD search instead.
I have been studying it and I think I can do it. I will maintain the current NGC/IC catalog since it is not large and it allows working without Internet connection. The configuration dialog will allow to select one or more catalogs.
-
Cartes du Ciel recently added SIMBAD lookup. It's not quite the same as you'd be looking for objects in a certain field of view and CdC looks for the coordinates of a named object. Maybe the source code helps you. It's in Pascal but pretty easy to read and convert.
-
I have already done several test and it is going to be quite easy. I only need to construct an URL with the query and Vizier returns a file with a table that contains only the objects that pass the filter. I have already implemented both the query constructor for the PGC (HYPERLEDA I) and the table parser.
-
Impressive!
-
This is fantastic! I was just wondering yesterday if this was possible, and here it is the day after and someone has independently started work on it!
Do you intend to make it fairly customisable in terms of colours, linetypes, linewidths, fonts etc for the overlay?
-
This is fantastic! I was just wondering yesterday if this was possible, and here it is the day after and someone has independently started work on it!
Do you intend to make it fairly customisable in terms of colours, linetypes, linewidths, fonts etc for the overlay?
The engine now has the following properties:
- Grid layer: lineColor, lineWidth, gridDensity, showLabels, labelColor, labelSize
- Object layers: showCircle, lineColor, lineWidth, showLabels, labelColor, labelSize
All layers will be optional.
The engine is 75% complete, but I have not started the user interface yet. I hope to have it finished by the end of the next week. Perhaps in a few days I could publish a first and incomplete version, but I can not promise anything because this weekend I am not going to be able to work on it.
-
This is fantastic! I was just wondering yesterday if this was possible, and here it is the day after and someone has independently started work on it!
Do you intend to make it fairly customisable in terms of colours, linetypes, linewidths, fonts etc for the overlay?
The engine now has the following properties:
- Grid layer: lineColor, lineWidth, gridDensity, showLabels, labelColor, labelSize
- Object layers: showCircle, lineColor, lineWidth, showLabels, labelColor, labelSize
All layers will be optional.
The engine is 75% complete, but I have not started the user interface yet. I hope to have it finished by the end of the next week. Perhaps in a few days I could publish a first and incomplete version, but I can not promise anything because this weekend I am not going to be able to work on it.
8)
-
Nice Work.
I'm waiting to try it.
-
I have already integrated a few catalogs from Vizier: PGC-HYPERLEDA, TYCHO2, USNO-B1 and PPMXL.
The star catalogs can be filtered by magnitude. Some of the catalogs have so much information that without filtering the annotation becomes a mess. Also, since some of the objects belongs to more than one catalog I have to eliminate the duplicates.
I have made an example using NGC/IC, PGC, TYCHO and USNO-B1 (<15 magnitude).
(http://fotos.subefotos.com/8044d67dc96b526361a85fb3053d8270o.jpg) (http://fotos.subefotos.com/8044d67dc96b526361a85fb3053d8270o.jpg)
-
Most impressive.
-
Wob! Amazing work!.
-
wow fantastic work - this would be so good showing people items you can capture. Look forward to a finished version :)
-
Wob! Amazing work!.
+1
-
I have ready a first version of the script. It is still not finished, but it can be used for testing.
The attached .zip has four files:
- Annotation script
- Shared code
- New version of plate-solve script
- NGC-IC catalog for the NGC layer in the script.
The script still needs a lot work. In the following days (¿weeks?) I plan to write the following functionality:
- SVG output
- Proper motion for stars in catalogs with this data
- More catalogs. I accept suggestions.
- Reordering of layers.
- Saving the settings to a file.
- Better layout of the configuration dialog and cleanup of the code
Feedback will be welcome.
Edited for removing an obsolete version of the script. Please, use the last version.
-
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?
-
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.
Edited for removing an obsolete version of the script. Please, use the last version.
-
Hi Andrés,
It would be very nice if you can just type the CDS catalog code. This would allow to identify sources of interest. For example, I have a deep photo of M51and want to locate the planetary nebulae in this galaxy. First, I go to Vizier and do a search for catalogs containing PNe in M51. Then I go to PI and in the options of your script I put the catalog code that Vizier gives. The result is my image in which only the sources I'm interested on are marked.
Another important option is, IMO, to be able to select a magnitude range, with both lower and upper limits.
And another wonderful option would be to select a list of files so it annotates all of them in a single action.
Congratulations. Best regards,
Vicent.
-
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:
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.
-
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.
-
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:
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.
-
Aah, I see now. Thanks. Must've worked first time around because I had hardcoded in my path.
-
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
-
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. ;)
-
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:
(http://www.astrofoto.es/astrofoto/foros/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.
-
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.
-
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:
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?
-
I like it. Much more intuitive IMO
-
[...The format will be very simple:
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
-
[...The format will be very simple:
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 :o :-[
-
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
-
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
-
I have a new version of both AnnotateImage and ImageSolver scripts.
ImageSolver has the following changes:
- Support for online catalogs (PPMXL and UCAC3) with much more stars than the catalog currently used by StarGenerator. It supports also proper motion computations.
- Changed parameters of StarAlignment that should allow to solve more images.
- Added control for the sensitivity of the star detector
- Reset button
AnnotateImage still is in a preview state and it needs much more tests. It has these changes:
- New layout.
- Validation of the path of the catalog NGC/IC.
- New catalog "Named stars". It is the catalog "IV/27A HD-DM-GC-HR-HIP-Bayer-Flamsteed Cross Index" that contains the common name of the brightests stars and the Bayer-Flamsteed names (i.e. "57 sig ori") for about 4000 stars. It does not support proper motions so it should not be used with long focals.
- New catalog UCAC3.
- Proper Motion in Tycho-2, PPMXL, UCAC3 and USNO-B1.
- Filter by magnitude (minimum and maximum).
- The label of the objects can be chosen between name, coordinates and magnitude.
- Much faster removing of duplicates.
- The font family can be changed
It still needs more work, including customizable catalogs and the ability of changing the figure for the star markers (cross, circle, square).
Edited: There was an important bug in the script. I have published a new version
-
New version :-[ :-[
-
Hi
Excellent stuff , will have a new play :D
Many thanks for your most skilled work :laugh:
Harry
-
somehow i could never get the solver to work until this latest version. i think it had something to do with the way stargenerator was creating the reference images; i had to tell StarGenerateor to use large-ish FWHMs or i could not even register my test image to the output of StarGenerator.
anyway, the latest version works, and the annotate script is working for me on a pretty widefield image, except for 2 things. one is that the NGC/IC textfile is not included in the zipfile that was posted immediately above, so i can't try that, and when i used the TYC catalog, only 1/2 the image was annotated. it looks like it stopped annotating at the celstial equator...
these scripts are really phenomenal! thanks for all your hard work.
-
well, okay. it seems that i am still struggling with other widefield images.
this is actually a problem with ImageSolver.js so maybe it belongs in the other thread, but i was trying to solve an image so that i could annotate it...
i discovered the following: if i generate a star field with StarGenerator and then try to solve that field with the script, it does not work. i never get any matched stars and the script fails.
the coordinates given are for the center of the veil nebula and if i generate this synthetic starfield, i can use StarAlignment in 'normal' mode to register a real image with this center and image scale. so i think the coordinates are good, and also if i ask the script to show me the stars it's found, they look good.
maybe you can try this experiment and tell me what i've done wrong here:
-
i discovered the following: if i generate a star field with StarGenerator and then try to solve that field with the script, it does not work. i never get any matched stars and the script fails.
the coordinates given are for the center of the veil nebula and if i generate this synthetic starfield, i can use StarAlignment in 'normal' mode to register a real image with this center and image scale. so i think the coordinates are good, and also if i ask the script to show me the stars it's found, they look good.
maybe you can try this experiment and tell me what i've done wrong here:
The problem is that you are generating the image using a conformal projection. ImageSolver only works with Gnomonic projection. If in your test you change only from Conformal to Gnomonic, the image can be solved.
Regarding your problems with widefield images, as I have said in a previous message, I don't think that the script in its current form can work consistently with short focals. With short focals there are too many optical distortions for StarAlignment doing a good job.
I don't know where is the limit. I usually get good results with focal lengths between 300 and 3000mm. Under that, it depends on the quality of the optics.
There are also problems with very deep images where the stars of magnitudes between 10-12 are saturated and which StarAligment is not able to recognize as stars. I think this images probably are better solved in their original lineal form before stretching the histogram.
so i can't try that, and when i used the TYC catalog, only 1/2 the image was annotated. it looks like it stopped annotating at the celstial equator...
VizieR servers have a limit of 50000 objects in each download. It seems that you have reached that limit and that you should set the magnitude filter to a lower value. This limit is not a problem because if you draw 50000 objects on an image, everything mixes and you can't see anything.
I will add a warning when this happens.
-
New version:
- ImageSolver:
- Fixed the bug that didn't allow to use the local catalog.
- AnnotateImage:
- Faster removing of duplicates (at most a few seconds in any case).
- Warning when VizieR limit of 50,000 objects in a download is reached.
- Added missing NGC/IC catalog.
Edited for removing and obsolete version. Please use the latest version.
-
i discovered the following: if i generate a star field with StarGenerator and then try to solve that field with the script, it does not work. i never get any matched stars and the script fails.
the coordinates given are for the center of the veil nebula and if i generate this synthetic starfield, i can use StarAlignment in 'normal' mode to register a real image with this center and image scale. so i think the coordinates are good, and also if i ask the script to show me the stars it's found, they look good.
maybe you can try this experiment and tell me what i've done wrong here:
The problem is that you are generating the image using a conformal projection. ImageSolver only works with Gnomonic projection. If in your test you change only from Conformal to Gnomonic, the image can be solved.
i didn't realize this.
Regarding your problems with widefield images, as I have said in a previous message, I don't think that the script in its current form can work consistently with short focals. With short focals there are too many optical distortions for StarAlignment doing a good job.
I don't know where is the limit. I usually get good results with focal lengths between 300 and 3000mm. Under that, it depends on the quality of the optics.
There are also problems with very deep images where the stars of magnitudes between 10-12 are saturated and which StarAligment is not able to recognize as stars. I think this images probably are better solved in their original lineal form before stretching the histogram.
with all due respect, this does not make sense to me. staralignment can register my widefield images to the synthetic starfield successfully, so i'm not sure why your script can't.
unless this has to do with the gnomonic projection. in that case why not use conformal for wide-field images? if it has to do with accuracy, well, for widefield images it does not matter as much.
the image of orion that i posted was taken with a 50mm lens so it's certainly possible for your script to do okay on extreme widefield images.
i agree about the usefulness of the annotated image with so many stars. it was just curious to me that it seems to have stopped right at the celestial equator. that seemed more likely to be the cause of the problem than a numerical limit given how abruptly it stopped.
-
...unless this has to do with the gnomonic projection. in that case why not use conformal for wide-field images? if it has to do with accuracy, well, for widefield images it does not matter as much.
...
I think using gnomic projection is best for this task because it mimics the way that the images of stars are projected onto the sensor plane, see http://en.wikipedia.org/wiki/Gnomonic_projection or http://wiki.panotools.org/Projections#Rectilinear_projection. In reality, this is only true for pin hole cameras, but good lenses/telescopes with long focal length do just this. Cheap lenses or lenses with short focal length deviate from this ideal, mostly because it is difficult to achieve, but sometimes also to achieve a certain effect (such as with fish eye lenses), or because it is simply impossible for a field of view>180 degrees.
Georg
-
...unless this has to do with the gnomonic projection. in that case why not use conformal for wide-field images? if it has to do with accuracy, well, for widefield images it does not matter as much.
...
I think using gnomic projection is best for this task because it mimics the way that the images of stars are projected onto the sensor plane, see http://en.wikipedia.org/wiki/Gnomonic_projection or http://wiki.panotools.org/Projections#Rectilinear_projection. In reality, this is only true for pin hole cameras, but good lenses/telescopes with long focal length do just this. Cheap lenses or lenses with short focal length deviate from this ideal, mostly because it is difficult to achieve, but sometimes also to achieve a certain effect (such as with fish eye lenses), or because it is simply impossible for a field of view>180 degrees.
Georg
gotcha.
update: 1) i changed my StarGenerator instance shown above to use Gnomonic projection, and A) StarAlignment can still register my real widefield image to the Gnomonic synthetic starfield, B) ImageSolver still fails on the Gnomonic synthetic starfield.
-
gotcha.
update: 1) i changed my StarGenerator instance shown above to use Gnomonic projection, and A) StarAlignment can still register my real widefield image to the Gnomonic synthetic starfield, B) ImageSolver still fails on the Gnomonic synthetic starfield.
Could you upload the image somewhere so I can analyze what is happening?
-
sure, no problem. it will have to wait a couple of hours though - work is interfering with real life :)
-
okay here is the synthetic image produced with gnomonic projection and also my widefield image (200mm lens, but slightly cropped). i admit that the star profiles are completely flat but StarAlignment can find them (and your script outputs 1000s of crosses right over all the stars, so it's finding them). but just trying to run ImageSolver on the synthetic image fails, while StarAlignment can register the real image to the synthetic image with no problem.
http://dl.dropbox.com/u/8884840/solver_images.zip
-
Hello
I had the following failures when starting annotate (latest version)
Processing script file: .../PixInsight/PI Other Scripts/Annotate/AnnotateImage.js
** Warning [162]: .../PixInsight/PI Other Scripts/Annotate/WCSmetadata.jsh, line 41: reference to undefined property properties[1]
*** Error [000]: .../PixInsight/PI Other Scripts/Annotate/WCSmetadata.jsh, line 41: Error: Settings.read(): invalid argument type: integer value expected.
I did exit PI, deleted manually the settings in the file Pixinsight.ini and everything went OK again. I suppose there was some incompatible change to the settings.
-- bitli
-
okay here is the synthetic image produced with gnomonic projection and also my widefield image (200mm lens, but slightly cropped). i admit that the star profiles are completely flat but StarAlignment can find them (and your script outputs 1000s of crosses right over all the stars, so it's finding them). but just trying to run ImageSolver on the synthetic image fails, while StarAlignment can register the real image to the synthetic image with no problem.
http://dl.dropbox.com/u/8884840/solver_images.zip
The script solves without problems the image that you have uploaded using the default parameters.
Image Plate Solver script version 1.3
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
+0.000090661556 +0.002760549781 -1.700779152248
-0.002766141743 +0.000090343588 +2.096542470019
+0.000000000000 +0.000000000000 +1.000000000000
Resolution ........ 9.953 arcsec/pix
Rotation .......... -91.818 deg
Focal ............. 248.68 mm
Pixel size ........ 12.00 um
Field of view ..... 4d 18' 7.5" x 3d 16' 4.9"
Image center ...... RA: 20 51 47.969 Dec: +30 39 40.51
Image bounds:
top-left ....... RA: 20 43 42.763 Dec: +32 44 33.99
top-right ...... RA: 20 44 42.300 Dec: +28 26 43.48
bottom-left .... RA: 20 59 13.506 Dec: +32 51 06.80
bottom-right ... RA: 20 59 32.564 Dec: +28 32 59.19
===============================================================================
I don't know why it doesn't work in your computer. The parameters that I used are in the attached screen capture.
-
Hello
I had the following failures when starting annotate (latest version)
Processing script file: .../PixInsight/PI Other Scripts/Annotate/AnnotateImage.js
** Warning [162]: .../PixInsight/PI Other Scripts/Annotate/WCSmetadata.jsh, line 41: reference to undefined property properties[1]
*** Error [000]: .../PixInsight/PI Other Scripts/Annotate/WCSmetadata.jsh, line 41: Error: Settings.read(): invalid argument type: integer value expected.
I did exit PI, deleted manually the settings in the file Pixinsight.ini and everything went OK again. I suppose there was some incompatible change to the settings.
-- bitli
I also had this problem, but since I have been doing lots of test and it disapeared when I reset the javascript engine I didn't give it much importance. Anyway, there is now in the code a check to prevent this failure.
-
The script solves without problems the image that you have uploaded using the default parameters.
I don't know why it doesn't work in your computer. The parameters that I used are in the attached screen capture.
very strange. i am running osx x86_64. i wonder if there's some weird difference in the PJSR interpreter.
edit: one difference is that i was using the vizier star catalog, since the version of the script i have is one rev back and has the bug where it won't use the local star catalog. could you try after switching to the vizier catalog and see what happens?
edit2: nope, same failure to solve with the new script and the local PPMX.bin star catalog. i wonder what is going on here. maybe juan can try this on his mac and see if he sees the same problem.
-
very strange. i am running osx x86_64. i wonder if there's some weird difference in the PJSR interpreter.
I agree, this is quite strange.
I am using StarAlignment with its default values for most of the parameters. Perhaps there is a difference in these values between your machine and mine. Please, could you execute the attached script and post what appears in the console?
In my computer the result is:
-----------------------
structureLayers = 4
noiseLayers = 1
hotPixelFilterRadius = 1
sensitivity = 0.10000000149011612
peakResponse = 0.800000011920929
maxStarDistortion = 0.5
invert = false
matcherTolerance = 0.003000000026077032
ransacTolerance = 2
ransacMaxIterations = 2000
ransacMaximizeInliers = 1
ransacMaximizeOverlapping = 1
ransacMaximizeRegularity = 1
ransacMinimizeError = 1
maxStars = 0
trianglesPerStar = 40
restrictToPreviews = true
intersection = 1
useBrightnessRelations = true
useScaleDifferences = true
scaleTolerance = 0.009999999776482582
referenceImage =
referenceIsFile = false
targets =
inputHints =
outputHints =
mode = 0
writeKeywords = true
generateMasks = false
frameAdaptation = false
useSurfaceSplines = false
pixelInterpolation = 10
clampingThreshold = 0.30000001192092896
linearClampingThreshold = 0.30000001192092896
outputDirectory =
outputExtension = .fit
outputPrefix =
outputPostfix = _r
maskPostfix = _m
outputSampleFormat = 0
overwriteExistingFiles = false
onError = 0
outputData =
NoIntersection = 0
MosaicOnly = 1
Always = 2
RegisterMatch = 0
RegisterUnion = 1
RegisterUnionSeparate = 2
Structures = 3
StructureMap = 4
DrawStars = 5
DrawMatchedStars = 6
OutputMatrix = 7
NearestNeighbor = 0
Bilinear = 1
BicubicSpline = 2
BicubicBSpline = 3
Lanczos3 = 4
Lanczos4 = 5
Lanczos5 = 6
MitchellNetravaliFilter = 7
CatmullRomSplineFilter = 8
CubicBSplineFilter = 9
Auto = 10
SameAsTarget = 0
i8 = 1
i16 = 2
i32 = 3
f32 = 4
f64 = 5
Continue = 0
Abort = 1
AskUser = 2
-----------------------
-
i don't see a script attached to that post...?
-
i don't see a script attached to that post...?
I should have taken more coffee for breakfast.
-
seems to look the same...
ugh.
Processing script file: /Volumes/newLeopard/Users/pfile/Downloads/test1.js
-----------------------
structureLayers = 4
noiseLayers = 1
hotPixelFilterRadius = 1
sensitivity = 0.10000000149011612
peakResponse = 0.800000011920929
maxStarDistortion = 0.5
invert = false
matcherTolerance = 0.003000000026077032
ransacTolerance = 2
ransacMaxIterations = 2000
ransacMaximizeInliers = 1
ransacMaximizeOverlapping = 1
ransacMaximizeRegularity = 1
ransacMinimizeError = 1
maxStars = 0
trianglesPerStar = 40
restrictToPreviews = true
intersection = 1
useBrightnessRelations = true
useScaleDifferences = true
scaleTolerance = 0.009999999776482582
referenceImage =
referenceIsFile = false
targets =
inputHints =
outputHints =
mode = 0
writeKeywords = true
generateMasks = false
frameAdaptation = false
useSurfaceSplines = false
pixelInterpolation = 10
clampingThreshold = 0.30000001192092896
linearClampingThreshold = 0.30000001192092896
outputDirectory =
outputExtension = .fit
outputPrefix =
outputPostfix = _r
maskPostfix = _m
outputSampleFormat = 0
overwriteExistingFiles = false
onError = 0
outputData =
NoIntersection = 0
MosaicOnly = 1
Always = 2
RegisterMatch = 0
RegisterUnion = 1
RegisterUnionSeparate = 2
Structures = 3
StructureMap = 4
DrawStars = 5
DrawMatchedStars = 6
OutputMatrix = 7
NearestNeighbor = 0
Bilinear = 1
BicubicSpline = 2
BicubicBSpline = 3
Lanczos3 = 4
Lanczos4 = 5
Lanczos5 = 6
MitchellNetravaliFilter = 7
CatmullRomSplineFilter = 8
CubicBSplineFilter = 9
Auto = 10
SameAsTarget = 0
i8 = 1
i16 = 2
i32 = 3
f32 = 4
f64 = 5
Continue = 0
Abort = 1
AskUser = 2
-----------------------
-
Hello,
There is a problem with images taken with SIPS. The DATE-OBS does not include the time, and therefore the date part is not terminated by the letter T. The regexp at line 234 of WCSmetadata fails (causing a NullPointerException on data like
DATE-OBS: '2012-03-20'
Here is the problematic line
var match = timeStr.match("'?([0-9]*)-([0-9]*)-([0-9]*)T");
I patched it like
var match = timeStr.match("'?([0-9]*)-([0-9]*)-([0-9]*)[T']");
which solves the problem in my case (but will not work if the date is not terminated by a quote or a T)
Clear skies
-- bitli
-
Got this error when running it after the Calibrate script. Reset of Javascript Runtime resolved problem:
C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js
run --execute-mode=auto "C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js"
Processing script file: C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js
** Warning [162]: C:/Users/georg/Downloads/AnnotateScript/WCSmetadata.jsh, line 12: reference to undefined property this.properties[i][1]
*** Error [000]: C:/Users/georg/Downloads/AnnotateScript/WCSmetadata.jsh, line 12: Error: Settings.read(): invalid argument type: integer value expected.
run --reset
Regenerating JavaScript runtime:
* Rebuilding core JavaScript objects...
JavaScript runtime initialized.
Georg
-
Got this error when running it after the Calibrate script. Reset of Javascript Runtime resolved problem:
C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js
run --execute-mode=auto "C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js"
Processing script file: C:/Users/georg/Downloads/AnnotateScript/ImageSolver.js
** Warning [162]: C:/Users/georg/Downloads/AnnotateScript/WCSmetadata.jsh, line 12: reference to undefined property this.properties[i][1]
*** Error [000]: C:/Users/georg/Downloads/AnnotateScript/WCSmetadata.jsh, line 12: Error: Settings.read(): invalid argument type: integer value expected.
run --reset
Regenerating JavaScript runtime:
* Rebuilding core JavaScript objects...
JavaScript runtime initialized.
Georg
I am aware of this problem. The Calibration script modifies the Array object and Annotation doesn´t like it. I have already fixed the problem and the next time that I release a version it should work without problems. The next version will take a few days since I am in an emergency mode at work.
I will try to fix also the problem with non-standard DATE-OBS fields.
-
I have a new version of both AnnotateImage and ImageSolver. Externally there are not big changes but I have done a refactoring for improving the design and sharing of code between both scripts.
The changes in this version are:
- Both: Adds support for saving the parameters as an icon.
- Both: It can be used with an image container.
- Both: When Reset is pressed now it is not necessary to reopen the script.
- Both: Fixed problem with incomplete values in DATE-OBS
- ImageSolver: The algorithm stops when the number of iterations is reached or the delta between iterations is less than 0.1 pixels.
- AnnotateImage: Better grid spacing.
With this version I have a better base for continue adding functionality.
I will add custom catalogs as described some days ago.
I will also add the possibility of inserting one or more text layers. The text will be combination of free text and variables (%DATEOBS, %COORDS, %ROTATION, %RESOLUTION, %FOCAL, ...) I.e.: "(C)Andrés del Pozo, %DATEOBS [%RESOLUTION arcsec]". It will be possible to select where to place the text and its graphics properties.
Edited for removing an obsolete version. Please use the last version.
-
Hi,
Thank you very much, Andrés.
Another suggestion. Now you can choose the grid density. For me it's more logical to choose the grid spacing (in angle) than the grid density.
Regards,
Vicent.
-
Hi,
Thank you very much, Andrés.
Another suggestion. Now you can choose the grid density. For me it's more logical to choose the grid spacing (in angle) than the grid density.
Regards,
Vicent.
The reason for using the density value is that it adapts automatically to different resolutions. Also, it is necessary only one value. For defining the grid using an spacing would be necessary to choose both the values for RA and Dec and also the units of the values (hour or minutes or seconds for RA and degrees or minutes or seconds for Dec). I will add this capability but I think that it is not a priority right now.
-
is anyone else using pixinsight on osx (x86-64) and has this working? still does not work for me.
-
Amazing work Andres, thanks!! :D
-
Hi
Thanks for your hard work
Harry
-
Hi Andrés; I have tried today your scripts and I they are wonderful; they add an important functionality for us. Thanks you!
Francisco
-
Andrés, congratulations on a great work very useful for all of us.
Un gran abrazo,
-
I just got pixinsight because I heard about / saw results of your plug-in. You, sir, have made a major impact on astrophotography, you should be very proud of your work. The annotation feature is pure magic, thank you soo much for sharing
-
is anyone else using pixinsight on osx (x86-64) and has this working? still does not work for me.
Same here...
run --execute-mode=auto "/Users/perfrejvall/Downloads/Solver_Annotate/ImageSolver.js"
Processing script file: /Users/perfrejvall/Downloads/Solver_Annotate/ImageSolver.js
StarGenerator: Global context
Gnomonic Projection
Projection center ....... ?=186.93750 ?=+13.00861
Field of view ........... H=2.18271 V=2.18271
Right ascension range ... ?E=185.81246 ?W=188.06254
Declination range ....... ?S=+11.91507 ?N=+14.09996
Searching stars...
328 stars found
Applying proper motions, epoch = 2451544.5: 100%
Star FWHM: 10.00 arcsec, 4.848 px
Rendering stars: 100%
102 stars in projection
0.997 s
StarAlignment: Processing view: integration
Loading reference image:
/tmp/stars.csv
*** Error: FileFormat: No installed image file format was found for the specified file extension and access conditions
<* failed *>
-
StarAlignment: Processing view: integration
Loading reference image:
/tmp/stars.csv
*** Error: FileFormat: No installed image file format was found for the specified file extension and access conditions
<* failed *>
I think that you not have installed the last version of PixInsight with the last updates. The script requires the version 01.07.05.0779 with all the updates.
-
/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.
-
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:
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 (http://pixinsight.com/forum/index.php?topic=4072.0)
-
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 ??
-
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 (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.
-
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,
-
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 (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 (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.
-
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.
-
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!
-
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 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/239#sRM2.1)
Data (http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/239#sRM2.1)
In any case, if this catalog is interesting enough I could add it to the list of supported catalogs.
-
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).
-
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 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257)
-
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)
-
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 -
-
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.
-
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.
-
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.
Yes indeed, on a Mac. I should have a tool to convert the line endings. Thanks for the heads up on the RA, I'll convert it with Excel and re-export. When I finish, do you want to see the resulting file?
-
Success! Partial success, anyway. I got the file to load after exporting it as a Windows TXT file from Excel, so it must have put in the right line endings.
Some of the stars are quite right, but others are mislabeled, over blank space.
In the attached example, HIP 32020 is correct (confirmed by another source), but HIP 91758 in the bottom left is wrong. It has an RA of 18h 42m 40s, but it is mapped here at 6h 42m 40s, 12 hours off -- 180 degrees. It is listed correctly in the file (I think, as per your instruction) at 280.6 degrees.
I may need to do another correction factor (positive and negative 180 degrees instead of out of 360?), but perhaps it's something in the script? Not sure, will keep playing.
Here's a link to the working catalog (mags thru 7): dropbox.com/sh/g1ka17f7x8p189r/9lB5n-DpP5/HipparcosMag0-7.txt
Edit: Also, it would be nice to be able to limit by magnitude on the custom catalogs as well -- that way, I could make the named star (Alhena) visible without its HIP number too.
-
Yes indeed, on a Mac. I should have a tool to convert the line endings. Thanks for the heads up on the RA, I'll convert it with Excel and re-export. When I finish, do you want to see the resulting file?
good to hear someone on osx has this working... i can't get it to work. has every single version of this script worked for you, or just the most recent one?
my images solve fine on windows so it's quite a mystery why they won't solve on OSX.
-
Some of the stars are quite right, but others are mislabeled, over blank space.
In the attached example, HIP 32020 is correct (confirmed by another source), but HIP 91758 in the bottom left is wrong. It has an RA of 18h 42m 40s, but it is mapped here at 6h 42m 40s, 12 hours off -- 180 degrees. It is listed correctly in the file (I think, as per your instruction) at 280.6 degrees.
I can confirm that there is a bug in the script. The Gnomonic projection is not valid for points more than 90º away from the center of the image and the script is not checking this in the custom catalog. This afternoon I will publish a new version with a few corrections.
Edit: Also, it would be nice to be able to limit by magnitude on the custom catalogs as well -- that way, I could make the named star (Alhena) visible without its HIP number too.
Please check that "Remove duplicated objects" is checked and that the catalog "Named stars" is in the list before the custom catalog. I will also modify the condition for considering two objects the same. It will use the resolution of the image for initializing the tolerance.
-
good to hear someone on osx has this working... i can't get it to work. has every single version of this script worked for you, or just the most recent one?
my images solve fine on windows so it's quite a mystery why they won't solve on OSX.
I don't know what is happening in your computer. I haven't access to a OSX so I can not give support to that platform.
Have you tried to reset the settings of Pixinsight? For doing this you have to hold the Ctrl key pressed while you launch the PixInsight Core application.
-
...I don't know what is happening in your computer. I haven't access to a OSX so I can not give support to that platform.
Maybe you guys can to a screensharing session, for example using TeamViewer http://www.teamviewer.com . It is free for non-commercial use, easy to set up, and rock solid.
Georg
-
Yes indeed, on a Mac. I should have a tool to convert the line endings. Thanks for the heads up on the RA, I'll convert it with Excel and re-export. When I finish, do you want to see the resulting file?
good to hear someone on osx has this working... i can't get it to work. has every single version of this script worked for you, or just the most recent one?
my images solve fine on windows so it's quite a mystery why they won't solve on OSX.
Yes, but I just started using it yesterday. The key for me was to upgrade my version of PI (32-bit) to 01.07.05.0779... it didn't work before that and threw the same error you were getting.
-
Some of the stars are quite right, but others are mislabeled, over blank space.
In the attached example, HIP 32020 is correct (confirmed by another source), but HIP 91758 in the bottom left is wrong. It has an RA of 18h 42m 40s, but it is mapped here at 6h 42m 40s, 12 hours off -- 180 degrees. It is listed correctly in the file (I think, as per your instruction) at 280.6 degrees.
I can confirm that there is a bug in the script. The Gnomonic projection is not valid for points more than 90º away from the center of the image and the script is not checking this in the custom catalog. This afternoon I will publish a new version with a few corrections.
Edit: Also, it would be nice to be able to limit by magnitude on the custom catalogs as well -- that way, I could make the named star (Alhena) visible without its HIP number too.
Please check that "Remove duplicated objects" is checked and that the catalog "Named stars" is in the list before the custom catalog. I will also modify the condition for considering two objects the same. It will use the resolution of the image for initializing the tolerance.
Remove Duplicates is indeed checked, but I think it is not matching up the known HIP star with the name. I tried adjusting the name format (adding a space, so "HIP 30202") but it still double labels the named stars. Do you know what label your Named Stars catalog uses for HIP stars? I will try to find out now...
By cutting my catalog in half and just using the 0-180 degree RA set, I got just what I wanted out of those. It would be great to be able to feed the whole list in, of course.
If possible, it would also be nice to limit by magnitude in the custom catalogs (if a MAGNITUDE column is present) so that we can filter the faintest stars in cases of over-annotating.
Thanks again for all your work, Andres, this is a major piece for me. I imagine Juan is watching this thread and I'm hoping he'll see the value of incorporating this functionality into the full PI build. :D
-
Yes indeed, on a Mac. I should have a tool to convert the line endings. Thanks for the heads up on the RA, I'll convert it with Excel and re-export. When I finish, do you want to see the resulting file?
good to hear someone on osx has this working... i can't get it to work. has every single version of this script worked for you, or just the most recent one?
my images solve fine on windows so it's quite a mystery why they won't solve on OSX.
Yes, but I just started using it yesterday. The key for me was to upgrade my version of PI (32-bit) to 01.07.05.0779... it didn't work before that and threw the same error you were getting.
okay, i'm not crazy then. i have been hesitant to apply the updates since someone was having a big problem with the new DSLR_RAW module and that's kind of important to me...
maybe i'll make a copy of the app and upgrade that one, just to see. thanks for the feedback.
-
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 (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 (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.
Thanks Andrés for your quick and detailed response.
I will let you know my findings.
Best regards,
-
okay, i'm not crazy then. i have been hesitant to apply the updates since someone was having a big problem with the new DSLR_RAW module and that's kind of important to me...
maybe i'll make a copy of the app and upgrade that one, just to see. thanks for the feedback.
Keep in mind that both AnnotateImage and ImageSolver use functionality introduced by Juan very recently. For using this scripts you MUST have the last version of PI with all the updates.
-
I have a new version of the annotation script with several bug fixes (thanks jlake ;) )
The improvements are these:
- Fix for custom catalogs that cover the entire sky.
- Support of custom catalogs with line endings in Mac format [CR].
- Fixed problem in the labels of the grid near RA=0h.
- More fields for the labels in the catalogs NamedStars (HD code, HIP code, Bayer-Flamsteed code) and Tycho2 (BT magnitude and HIP code).
- Shortened the names of the variables in the persistence. PI seems to have a limit in the length of the parameter list.
-
Hi Andrés,
Can I release an update with this version?
-
Shortened the names of the variables in the persistence. PI seems to have a limit in the length of the parameter list.
What do you refer to exactly? The Parameters JavaScript object has no specific limit. The only limit is the maximum number of console lines, which is 1000 by default but can be increased or even disabled. Do you really need more than 1000 lines to write your script parameters to the command line each time your script is launched from an instance?
-
Juan, I think that both scripts are ready for publishing.
Shortened the names of the variables in the persistence. PI seems to have a limit in the length of the parameter list.
What do you refer to exactly? The Parameters JavaScript object has no specific limit. The only limit is the maximum number of console lines, which is 1000 by default but can be increased or even disabled. Do you really need more than 1000 lines to write your script parameters to the command line each time your script is launched from an instance?
I have tried to reproduce the problem that I had, but it doesn't fail anymore. The script uses tens of parameter for defining the values for all the layers. Yesterday doing tests of saving to an icon it started to fail. I can't remember the error but it got fixed when I made shorter the names of the parameters.
This is an example of command line:
run -x -p="engine_vizierServer,http://vizier.u-strasbg.fr/" -p="engine_removeDuplicates,true" -p="engine_outputMode,0" -p="engine_applySTF,false" -p="engine_epoch,2451544.5" -p="layer0_visible,true" -p="layer0_showMarkers,true" -p="layer0_lineColor,2164260863" -p="layer0_lineWidth,1" -p="layer0_showLabels,true" -p="layer0_labelSize,12" -p="layer0_labelBold,false" -p="layer0_labelItalic,false" -p="layer0_labelColor,4294967295" -p="layer0_labelFace,1" -p="layer0_density,4" -p="layer1_visible,true" -p="layer1_showMarkers,true" -p="layer1_lineColor,4294967295" -p="layer1_lineWidth,1" -p="layer1_showLabels,true" -p="layer1_labelSize,10" -p="layer1_labelBold,false" -p="layer1_labelItalic,false" -p="layer1_labelColor,4294967295" -p="layer1_labelFace,1" -p="layer1_magMin,1000" -p="layer1_magMax,1000" -p="layer2_visible,true" -p="layer2_showMarkers,true" -p="layer2_lineColor,4294967295" -p="layer2_lineWidth,1" -p="layer2_showLabels,true" -p="layer2_labelSize,10" -p="layer2_labelBold,false" -p="layer2_labelItalic,false" -p="layer2_labelColor,4294967295" -p="layer2_labelFace,1" -p="layer2_catalogPath,C:/Users/Andres/Documents/PCL/ngc2000.txt" -p="layer3_visible,true" -p="layer3_showMarkers,true" -p="layer3_lineColor,4294967295" -p="layer3_lineWidth,1" -p="layer3_showLabels,true" -p="layer3_labelSize,10" -p="layer3_labelBold,false" -p="layer3_labelItalic,false" -p="layer3_labelColor,4294967295" -p="layer3_labelFace,1" -p="layer3_magMin,1000" -p="layer3_magMax,1000" -p="layer4_visible,true" -p="layer4_showMarkers,true" -p="layer4_lineColor,4294967295" -p="layer4_lineWidth,1" -p="layer4_showLabels,true" -p="layer4_labelSize,10" -p="layer4_labelBold,false" -p="layer4_labelItalic,false" -p="layer4_labelColor,4294967295" -p="layer4_labelFace,1" -p="layer5_visible,true" -p="layer5_showMarkers,true" -p="layer5_lineColor,805306368" -p="layer5_lineWidth,1" -p="layer5_showLabels,true" -p="layer5_labelSize,14" -p="layer5_labelBold,false" -p="layer5_labelItalic,false" -p="layer5_labelColor,4294967295" -p="layer5_labelFace,1" -p="layer5_positionX,0" -p="layer5_positionY,100" -p="layer5_text," -p="layer6_visible,true" -p="layer6_showMarkers,true" -p="layer6_lineColor,805306368" -p="layer6_lineWidth,1" -p="layer6_showLabels,true" -p="layer6_labelSize,14" -p="layer6_labelBold,false" -p="layer6_labelItalic,false" -p="layer6_labelColor,4294967295" -p="layer6_labelFace,1" -p="layer6_positionX,0" -p="layer6_positionY,100" -p="layer6_text," -p="layer7_visible,true" -p="layer7_showMarkers,true" -p="layer7_lineColor,4294967295" -p="layer7_lineWidth,1" -p="layer7_showLabels,true" -p="layer7_labelSize,10" -p="layer7_labelBold,false" -p="layer7_labelItalic,false" -p="layer7_labelColor,4294967295" -p="layer7_labelFace,1" -p="layer7_magMin,1000" -p="layer7_magMax,15" -p="layer8_visible,true" -p="layer8_showMarkers,true" -p="layer8_lineColor,4294967295" -p="layer8_lineWidth,1" -p="layer8_showLabels,true" -p="layer8_labelSize,10" -p="layer8_labelBold,false" -p="layer8_labelItalic,false" -p="layer8_labelColor,4294967295" -p="layer8_labelFace,1" -p="layer8_magMin,1000" -p="layer8_magMax,15" -p="layer9_visible,true" -p="layer9_showMarkers,true" -p="layer9_lineColor,4294967295" -p="layer9_lineWidth,1" -p="layer9_showLabels,true" -p="layer9_labelSize,10" -p="layer9_labelBold,false" -p="layer9_labelItalic,false" -p="layer9_labelColor,4294967295" -p="layer9_labelFace,1" -p="layer9_magMin,1000" -p="layer9_magMax,15" -p="engine_layers,new GridLayer()|new CatalogLayer(new NamedStarsCatalog())|new CatalogLayer(new NGCICCatalog())|new CatalogLayer(new TychoCatalog())|new CatalogLayer(new PGCCatalog())|new TextLayer()|new TextLayer()|new CatalogLayer(new UCAC3Catalog())|new CatalogLayer(new PPMXLCatalog())|new CatalogLayer(new USNOB1Catalog())|new GridLayer()|new GridLayer()|new GridLayer()" -p="isGlobalTarget,true" -p="isViewTarget,false" -p="layer10_visible,true" -p="layer10_showMarkers,true" -p="layer10_lineColor,2164260863" -p="layer10_lineWidth,1" -p="layer10_showLabels,true" -p="layer10_labelSize,12" -p="layer10_labelBold,false" -p="layer10_labelItalic,false" -p="layer10_labelColor,4294967295" -p="layer10_labelFace,1" -p="layer10_density,4" -p="layer11_visible,true" -p="layer11_showMarkers,true" -p="layer11_lineColor,2164260863" -p="layer11_lineWidth,1" -p="layer11_showLabels,true" -p="layer11_labelSize,12" -p="layer11_labelBold,false" -p="layer11_labelItalic,false" -p="layer11_labelColor,4294967295" -p="layer11_labelFace,1" -p="layer11_density,4" -p="layer12_visible,true" -p="layer12_showMarkers,true" -p="layer12_lineColor,2164260863" -p="layer12_lineWidth,1" -p="layer12_showLabels,true" -p="layer12_labelSize,12" -p="layer12_labelBold,false" -p="layer12_labelItalic,false" -p="layer12_labelColor,4294967295" -p="layer12_labelFace,1" -p="layer12_density,4" --md5="dc8da8b0092b7ae0eca0b1984d62b286" -p="isGlobalTarget,false" -p="isViewTarget,true" -p="targetView,_2009_06_13_M13_v1" "C:/Users/Andres/Documents/PCL/AnnotateImage.js"
It works now, but yesterday a similar test failed.
-
Once again, fantastic work! This new version works great with my original HIP archive data and it took care of the duplication issue nicely.
Attached is an example of output with the custom catalog of HIP stars. Also, here is the HIP catalog file for those interested: dropbox.com/sh/v11byktj1var569/Dp-BkBbX_0/Hipparcos.txt
One thing to adjust for the future: on the Mac (or perhaps just at my resolution?), the original script window is squeezed. It is no problem to resize it, but it'd be best if it fully fit from the start. I'm not sure if that would make it look to big on the PC, though...
-
I've made a few improvements - version 0.65 attached:
* Fixed a couple problems with dialog dimensions (but this is a provisional workaround - we need a better method).
* Fixed a few message strings.
* A more robust method to compute the local path to the NGC/IC catalog (the script can now be stored anywhere in the local filesystem)..
To find the changes I've made in the source code, search for the string: /*###*/
The script needs a robust routine to split a text file into text lines in a platform-independent way. Tomorrow I can adapt the routine I have used in the PIDoc compiler script (can read UTF8 text files with any combination of end-of-line sequences).
Andrés, let me know if you agree with these changes.
-
I've made a few improvements - version 0.65 attached:
* Fixed a couple problems with dialog dimensions (but this is a provisional workaround - we need a better method).
* Fixed a few message strings.
* A more robust method to compute the local path to the NGC/IC catalog (the script can now be stored anywhere in the local filesystem)..
To find the changes I've made in the source code, search for the string: /*###*/
The script needs a robust routine to split a text file into text lines in a platform-independent way. Tomorrow I can adapt the routine I have used in the PIDoc compiler script (can read UTF8 text files with any combination of end-of-line sequences).
Andrés, let me know if you agree with these changes.
Hi Juan.
That's awesome - I'm really loving this new functionality.
I'm trying (at present) to integrate session info from APT which I use to control my DSLR. I've got access to DEC, RA, focal length, pixel size etc., and have a working method to add this metainfo to the .cr2 files produced by the Canon cameras (and APT).
At present, I note that when you import raw images, you set DATE_OBS based on the camera date setting. Given that I can create almost any other tag with the required information from the imaging software, what tag names should I set to get the information automatically into Pixinsight? Will the default tag names (FOCALLEN, XPIXSZ, YPIXSZ etc.) be imported, or are there other changes required in Pixinsight required to read/import this information?
-
okay, i'm not crazy then. i have been hesitant to apply the updates since someone was having a big problem with the new DSLR_RAW module and that's kind of important to me...
maybe i'll make a copy of the app and upgrade that one, just to see. thanks for the feedback.
Keep in mind that both AnnotateImage and ImageSolver use functionality introduced by Juan very recently. For using this scripts you MUST have the last version of PI with all the updates.
i'm fairly certain that i was up to date a few weeks ago when i reported the problem initially... i think the updates i'm referring to have appeared in the last couple of weeks.
-
I've made a few improvements - version 0.65 attached:
* Fixed a couple problems with dialog dimensions (but this is a provisional workaround - we need a better method).
* Fixed a few message strings.
* A more robust method to compute the local path to the NGC/IC catalog (the script can now be stored anywhere in the local filesystem)..
To find the changes I've made in the source code, search for the string: /*###*/
The script needs a robust routine to split a text file into text lines in a platform-independent way. Tomorrow I can adapt the routine I have used in the PIDoc compiler script (can read UTF8 text files with any combination of end-of-line sequences).
Andrés, let me know if you agree with these changes.
Juan, I agree with the changes.
There is a debug message that I forgot to delete in the line 887 in AstronomicalCatalogs.jsh.
Also, I am not very fluent in Javascript (as in english) and I don't know if the mechanism for generalizing the layers and catalogs (GetConstructor functions and __catalogRegister__) is the best one.
-
I have found a serious error in the layer management. The buttons delete, move up and move down modify the layers on the dialog but these changes were not applied to the engine and not used in the annotation.
The version 0.7 fixes this problem.
-
Once again, fantastic work! This new version works great with my original HIP archive data and it took care of the duplication issue nicely.
Attached is an example of output with the custom catalog of HIP stars. Also, here is the HIP catalog file for those interested: dropbox.com/sh/v11byktj1var569/Dp-BkBbX_0/Hipparcos.txt
Nice work!! This proves that the custom catalogs are useful.
However, using the last version of the script you can get the same annotation using only predefined catalogs. The trick is using the Tycho-2 catalog with a max magnitude of 8 and selecting the HIP code for the label.
-
Buenos días Andrés
Believe me that nobody could say that you are not very fluent with JavaScript---I know professional web programmers that would be unable to write something with half the complexity of your Annotate.js.
I don't know if the mechanism for generalizing the layers and catalogs (GetConstructor functions and __catalogRegister__) is the best one.
There is something important to note in this regard. The eval function is extremely dangerous in JavaScript, since it opens a door to inject malicious code in any script. For this reason all script parameter values stored with the Parameters PJSR object are simple strings, and type conversions (for example, from String to Number) are performed by internal C++ code to which no script has direct access. This guarantees that a script parameter cannot be used to execute any unwanted code with the Script process in PixInsight. However, if your code calls eval() for parameter strings, this is a potential security breach. I don't want to be more explicit --- suffice this to show that eval() is a very serious potential security risk.
So I'd rewrite your code to avoid eval() completely. Other than this, your script is absolutely wonderful :)
-
Buenos días Andrés
Believe me that nobody could say that you are not very fluent with JavaScript---I know professional web programmers that would be unable to write something with half the complexity of your Annotate.js.
I am a professional programmer with lots (too many?) years of experience, although not in Javascript.
[...]suffice this to show that eval() is a very serious potential security risk
I was aware of this, but I couldn't find a better way. Although Javascript has some nice things, it has too many rough edges. There are a lot of things that were learned in the 70's and 80's and that have been forgotten in Javascript.
-
Currently you are storing something like this in your engine_layers script parameter:
"new GridLayer()|" +
"new CatalogLayer(new NamedStarsCatalog())|" +
"new CatalogLayer(new NGCICCatalog())|" +
"new CatalogLayer(new TychoCatalog())|" +
"new CatalogLayer(new PGCCatalog())"
Then your script runs the following code to recreate a set of annotation layers:
var layerConstructors = layersStr.split( "|" );
this.layers = new Array;
for ( var l = 0; l < layerConstructors.length; l++ )
{
this.layers[l] = eval( layerConstructors[l] );
this.layers[l].SetId( l );
this.layers[l].LoadParameters();
}
Although this solution is indeed elegant and powerful (for example, it is not restricted to a finite and fixed set of layer and catalog objects), it in inherently insecure. As a somewhat 'dramatic' example, somebody could change one of these parameters to remove all files in the user's home directory, and your script would execute the corresponding code efficiently in the first call to eval() :)
You can replace this system with a simple parser. Many people would use XML to implement this functionality, but XML tends to generate a lot of unnecessary overhead in these cases, just to be 'fancy'. Another cleaner option would be JSON. Personally I tend to favor even simpler adhoc solutions. Suppose that instead of the above parameter we had the following stored in engine_layers:
"GRID|CATALOG:NAMED_STARS|CATALOG:NGCIC|CATALOG:TYCHO|CATALOG:PGC"
Now instead of your eval()-based code we can implement the following:
var layerConstructors = layersStr.split( "|" );
this.layers = new Array;
for ( var l = 0; l < layerConstructors.length; l++ )
{
var constructorParameters = layerConstructors[l].split( ":" );
if ( constructorParameters.length < 1 )
throw new Error( "Missing layer constructor in parameter." );
switch ( constructorParameters[0] )
{
case "GRID":
if ( constructorParameters.length > 1 )
throw new Error( "Invalid layer constructor: The GRID constructor takes no parameters." );
this.layers[l] = new GridLayer;
break;
case "CATALOG":
if ( constructorParameters.length != 2 )
throw new Error( "Invalid layer constructor: The CATALOG constructor takes one parameter." );
var catalog;
switch ( constructorParameters[1] )
{
case "NAMED_STARS": catalog = new NamedStarsCatalog(); break;
case "NGCIC": catalog = new NGCICCatalog(); break;
case "TYCHO": catalog = new TychoCatalog(); break;
case "PGC": catalog = new PGCCatalog(); break;
default:
throw new Error( "Invalid layer constructor: Unknown catalog type." );
}
this.layers[l] = new CatalogLayer( catalog );
break;
default:
throw new Error( "Invalid layer constructor: Unknown layer type." );
}
this.layers[l].SetId( l );
this.layers[l].LoadParameters();
}
with the corresponding changes to generate the parameter contents. The above code is secure, since there is no way to force it to do anything unwanted. It just generates your annotation layers with basic error checking, and cannot execute anything else. It is considerably uglier and not too elegant, but hey, enforcing security has always had a price :)
-
[...] The above code is secure, since there is no way to force it to do anything unwanted. It just generates your annotation layers with basic error checking, and cannot execute anything else. It is considerably uglier and not too elegant, but hey, enforcing security has always had a price :)
I was just trying to avoid the giant switch and implement a generic factory of objects, but if it is not possible we have to bear the limitations of javascript.
One possible idea would be validating the constructor text before calling eval. If the constructor is not found in the layer or catalog registry it would not be executed.
-
One possible idea would be validating the constructor text before calling eval. If the constructor is not found in the layer or catalog registry it would not be executed.
Yes. If you can validate the semantics of the code stored in script parameters, then calling eval() would be secure. However, I don't know if the code necessary to implement this would be even more complex than the giant switch.
Another possibility would be validating the parameter's code with a cryptographic digest, such as MD5. This would be a lot faster and very clean. But, how can we store the digest in a way that a malicious parameter modification could not simulate?
-
Once again, fantastic work! This new version works great with my original HIP archive data and it took care of the duplication issue nicely.
Attached is an example of output with the custom catalog of HIP stars. Also, here is the HIP catalog file for those interested: dropbox.com/sh/v11byktj1var569/Dp-BkBbX_0/Hipparcos.txt
Nice work!! This proves that the custom catalogs are useful.
However, using the last version of the script you can get the same annotation using only predefined catalogs. The trick is using the Tycho-2 catalog with a max magnitude of 8 and selecting the HIP code for the label.
Ah ha! I hadn't explored that new keyword functionality in the newest version.
I experimented with it and am very happy with the results, but I noticed one thing: if I filter to 9th magnitude, I get stars that are marked but not labeled, presumably because they are too small. This is not the end of the world for my frames, but it might lead to clutter in bigger or richer fields. Take a look.
-
I experimented with it and am very happy with the results, but I noticed one thing: if I filter to 9th magnitude, I get stars that are marked but not labeled, presumably because they are too small. This is not the end of the world for my frames, but it might lead to clutter in bigger or richer fields. Take a look.
This happens because some stars have not HIP code in the TYCHO-2 catalog.
-
Yes. If you can validate the semantics of the code stored in script parameters, then calling eval() would be secure. However, I don't know if the code necessary to implement this would be even more complex than the giant switch.
I was thinking in something easier. Simply check if there is a layer in the registry which constructor is the same as the parameter value.
Another idea would be that the layer registry associates the layer name with the constructor. Instead of saving the constructor, we'll save the name. For example, the layer register could be constructed this way:
for( var c=0; c<__catalogRegister__.length; c++ )
{
var catalog = eval(__catalogRegister__[c]);
var layer = new CatalogLayer(catalog);
__layerRegister__[layer.layerName] = layer.GetConstructor() );
}
-
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, 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".
-
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! :)
-
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
-
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:
(http://www.werbeagentur.org/oldwexi/fotos/bunt_annotated_crop.jpg)
Large version under:
http://www.werbeagentur.org/oldwexi/fotos/bunt_annotated_crop.jpg (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
-
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
(http://www.skypixels.at/downloads/PI_Forum/elum_chisquare_annotated.jpg)
-
[...]
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.
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.
-
Hi Andres!
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!
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
-
Hi Andres!
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.
-
Hi Andres!
Uuups - sorry - I didnt notice the buttons.
Thank you.
Herbert, Austria
-
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.
-
Hi Enzo!
Perfect!
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
-
Hi Herbert,
I got it there.
http://endor.uv.es/data/forum/Annotation_Script_Catalogs/
Antoine
-
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? :)
-
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.
-
After running the image solver, I can no longer use the StarGenerator, because when selecting the PPMX file, the system always tells me that the file already is in use. This is on Windows 7. I think the cause probably is that the file is not properly closed after use in image solver, and that it has been opened for read/write instead of read only. This is just a guess: I did not have a look at the sources.
Georg
-
I have difficulties with the solver running on a wide field (12mm, screenshot 1). I know that the underlying StarAlignment process cannot handle distortions well, so I thought it might be able to solve a small snippet of the full image (screenshot 2), because the remaining distortions should be much smaller. No luck though-at least with the parameters shown in the screenshot
The 3rd attachment contains the snippet I am trying to solve. Maybe someone else can give a hint on how to achieve the goal.
Georg
-
I fitted the snippet to the star map using dynamic alignment. The attached screenshot shows the fitted image, with the star map as a mask (red dots), and with an approximate rectangle drawn using dynamic crop. It is clear from this that a fit does not only need translation, rotation and rescale (identical in x and y), but also a certain sheer and different scales in x and y. And this apparently is something that StarAlignment currently cannot do.
I wonder if StarAlignment could be extended to handle this kind of distortions. If that is possible, we could map wide fields to star maps doing it in small pieces. Currently that does not work.
Georg
-
Message: Cannot find file!
Hum...for some reason the link generated from the system does what he thought he would ??? As Antoine said, the file is located in /Annotation_Script_Catalogs/, a public directory, with a generic name to centralize other catalogs there.
Greetings,
Enzo.
-
Hi Enzo!
Found the the LONEOS_photometry.txt file in the Pixinsight Files System and downloaded the file.
When i try to use it in ImageSolver as local catalogue the script asks for
a *.bin file. The *.txt file is not accepted.
Für sure i missed a step...
Do you have any hints?
Gerald
-
Hi Enzo!
Found the the LONEOS_photometry.txt file in the Pixinsight Files System and downloaded the file.
When i try to use it in ImageSolver as local catalogue the script asks for
a *.bin file. The *.txt file is not accepted.
Für sure i missed a step...
Do you have any hints?
Gerald
Hi Gerald,
I use .txt, like original NGC/IC catalog provided with the script, and I have had no troubles (Win XP 32b), the 'catalog path' dialog accepts .txt. Your NGC/IC catalog is 'ngc2000.txt'?. You can try renaming the LONEOS file extension from .txt to .bin and test again, but I think in .txt should work... Andres?
A detail: I have noticed an extra space in the filename: 'LONEOS_photometry .txt'. I corrected to 'LONEOS_photometry.txt', to avoid problems.
Let me know if it worked.
Greetings,
Enzo.
-
Hi Enzo!
Found the the LONEOS_photometry.txt file in the Pixinsight Files System and downloaded the file.
When i try to use it in ImageSolver as local catalogue the script asks for
a *.bin file. The *.txt file is not accepted.
Für sure i missed a step...
Do you have any hints?
Gerald
ImageSolver uses the catalog provided by Pixinsight for the StarGenerator module. It is a .bin file that can be downloaded from http://pixinsight.com/download/index.html (http://pixinsight.com/download/index.html). This is documented in the tooltip of the text field in the configuration dialog.
AnnotateImage uses the supplied file ngc2000.txt for the NGC/IC catalog. The last version should be able to select automatically this file.
The custom catalog layer in AnnotateImage uses an TAB-separated file documented in this message: http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257)
-
Thanks Enzo, thanks Andres for the explanations!
Now i understand better.
Again, this tool is excellent!
Aloha
Gerald
-
Hi Andres!
Its a Reply to #126
If you find in Vizier a better catalog for deep sky objects, please send me its name so I can analyze it.
I had a look in Vizier and here are examples for my wish list:
VDB VizieR VII/21
Sharpless VizieR VII/20
Barnard VizieR VII/220A/barnard
.
.
I'm not sure about your intention, to include several deepsky catalogs.
But my first wish is labeled stars with the B-V index (optionally).
Again, thanks for this great tool.
Best regards.
Herbert, Austria
-
(this about an article published in spanish, so I'm write in spanish this message, sorry ;) )
Hola,
He publicado en Sur Astronómico un pequeño artículo sobre el plate solving, me ha parecido interesante dar a conocer estas nuevas posibilidades que los scripts de Andrés permiten llevar a adelante sobre la plataforma de PixInsight. Los interesados podrán encontrarlo en la siguiente dirección:
http://surastronomico.com/not-746-plate-solving-con-pixinsight.html (http://surastronomico.com/not-746-plate-solving-con-pixinsight.html)
Si es de su agrado, los invito a compartirlo en sus redes.
Saludos,
Enzo.
-
(this about an article published in spanish, so I'm write in spanish this message, sorry ;) )
Hola,
He publicado en Sur Astronómico un pequeño artículo sobre el plate solving, me ha parecido interesante dar a conocer estas nuevas posibilidades que los scripts de Andrés permiten llevar a adelante sobre la plataforma de PixInsight. Los interesados podrán encontrarlo en la siguiente dirección:
http://surastronomico.com/not-746-plate-solving-con-pixinsight.html (http://surastronomico.com/not-746-plate-solving-con-pixinsight.html)
Si es de su agrado, los invito a compartirlo en sus redes.
Saludos,
Enzo.
Te ha quedado muy bien el artículo. Me parece especialmente interesante utilizar el ángulo de rotación calculado para "desrotar" la imagen. Una mejor solución sería utilizar la matriz de referenciación, pero eso requeriría otro script ;)
-
Te ha quedado muy bien el artículo. Me parece especialmente interesante utilizar el ángulo de rotación calculado para "desrotar" la imagen. Una mejor solución sería utilizar la matriz de referenciación, pero eso requeriría otro script ;)
Gracias Andrés!. Es un trabajo tan bien realizado, y una posibilidad tan interesante, que tuve muchas ganas de darlo a conocer. Y ojalá esto también motive a otros para incursionar en PixInsight.
Saludos,
Enzo.
-
i'm going to upload another image. this time it's not a widefield image, but approx 60 by 40 arcminutes at 1100mm. it won't solve on my mac. if i ask the solver to output the stars it is using, it seems to have found valid stars.
for fun i downloaded an image of M51 from DSS and it does solve on the mac. that leads me to believe there's something wrong with my input images, but we'll see.
edit: okay, well after playing with stargenerator and staralignment, i found that i had to increase my star magnitude to 22. that might have been overkill but it's the first thing i tried and it worked.
-
The version 1.0 on AnnotateImage is ready.
This version has these improvements:
- Label alignment: The user can chose to draw the labels in different positions for each catalog.
- Fixed grid around the poles
- New field "NGC/IC code" in NGC/IC catalog. Cleaned name column in the catalog.
- Hipparcos Main Catalog (VizieR I/239) with B-V and Spectral Type fields.
- Catalog of Reflection Nebulae - Van den Bergh (VizieR VII/21)
- Catalog of HII Regions - Sharpless (VizieR VII/20)
- Barnard's Catalog of Dark Objects in the Sky (VizieR VII/220A)
-
Hi
Really really excellent stuff , thank you so much :-*
Harry
-
Hi
I know I have asked before , but I don't know how to do it but is there a list of fainter galaxys ;D
Harry
-
Thanks, Andres, for all your hard work bringing us this great script. I was pleased to see the addition of more catalogs. Like Herbert, I would like to see the B-V index for a many stars as possible in an image as it's a great way to check star color. The Hipparcos catalog should provide this info but I'm not able to see any results. Tried 4 or 5 images but no data from that catalog is displayed. I've tried several of the choices in the Label Text drop down list with no results on image. Does it matter which Vizer server is chosen in the General properties section? Any help appreciated and again, many thanks.
Steve
-
Hi Andres!
Thanks a lot for the added catalogs.
Your tool is absolut fanastic and it saves me a lot of time (in compare to aladin and other sources).
I dont need another software or links for objectidentification - just PixInsight - thats great!!
Thanks again and kind regards.
Herbert, Austria
What format do you need for the catalogs?
- my wishlist for catalogs is not finished ;) not yet
-
Hi
I know I have asked before , but I don't know how to do it but is there a list of fainter galaxys ;D
Would the 2MASS catalog (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII%2F233 (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII%2F233)) be enough? It has 1647599 objects.
-
Thanks, Andres, for all your hard work bringing us this great script. I was pleased to see the addition of more catalogs. Like Herbert, I would like to see the B-V index for a many stars as possible in an image as it's a great way to check star color. The Hipparcos catalog should provide this info but I'm not able to see any results. Tried 4 or 5 images but no data from that catalog is displayed. I've tried several of the choices in the Label Text drop down list with no results on image. Does it matter which Vizer server is chosen in the General properties section? Any help appreciated and again, many thanks.
Steve
The Hipparcos catalog has only a few hundreds of stars. It is really only useful for wide field images.
The "UBVRI photometry of faint field stars" (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=II%2F277 (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=II%2F277)) has the B-V index for 34000 stars. This catalog is still quite short, but I can not find a bigger catalog with B-V indexes. Do you know a better catalog?
-
What format do you need for the catalogs?
- my wishlist for catalogs is not finished ;) not yet
The script currently supports catalogs served by VizieR (http://VizieR) servers or catalogs in a custom format defined in this message (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257).
In this other message (http://pixinsight.com/forum/index.php?topic=3966.msg28314#msg28314) there is an explanation for creating a custom catalog.
-
Thanks for your quick reply. Currently I use Aladin in conjunction with my RGB image to check star color. In Aladin I use 2 catalogs to get V mag, R mag and/or g mag for the stars in the image abd then with these values one can determine what the star color should be. In Aladin this is done by clicking on a star, one star at a time. The 2 catalogs are:
NOMAD: http://cdsarc.u-strasbg.fr/viz-bin/Cat?NOMAD1
SDSS Photometric, Release 7: http://cdsarc.u-strasbg.fr/viz-bin/Cat?SDSS-DR7
I believe the SDSS catalog is more accurate but covers less sky than the NOMAD catalog.
If the V, R, and G mags could be displayed for the stars in the image, that would be outstanding .
Thanks again for your help.
Steve
-
Hi Andres!
OK - I overlooked the messages to create a custom catalog,.....
SDSS: release 8 is the newest.
Best regards.
Herbert, Austria
-
Hi
I know I have asked before , but I don't know how to do it but is there a list of fainter galaxys ;D
Would the 2MASS catalog (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII%2F233 (http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII%2F233)) be enough? It has 1647599 objects.
Hi
Yes that would be excellent ;D
Harry
-
After reading the feedback of the last night I am going to rethink the implementation of the labels.
I am thinking in allowing up to 8 labels around an object. The dialog instead of having one combobox for selecting the label, it would have eight, one in each possible location. Each combo would allow to be left empty or select one of the available fields:
______ | Name | ______ |
______ | | ______ |
MagV | ______ | MagB |
I don't know whether this is really useful or it would be too hard to use for casual users.
-
Hi
I don't think that would be a problem , the script is not difficult to use :laugh:
I wonder long term if this script could be used in colour corection of our images if we know what stars are what colour :D I mean Juan does not have a lot to do these days >:D
Harry
-
After reading the feedback of the last night I am going to rethink the implementation of the labels.
I am thinking in allowing up to 8 labels around an object. The dialog instead of having one combobox for selecting the label, it would have eight, one in each possible location. Each combo would allow to be left empty or select one of the available fields:
______ | Name | ______ |
______ | | ______ |
MagV | ______ | MagB |
I don't know whether this is really useful or it would be too hard to use for casual users.
This is a great idea, I would use this functionality quite a bit!
-
Agree, the ability to display more than one label at a time is a great idea.
Steve
-
I've had this idea since the ImageSolver and AnnotateImage were first provided by Andres - to use them to locate white balance stars for ColorCalibration. Last night I woke at 4am and couldn't get back to sleep, and for some reason it seemed like a good time to teach myself JavaScript, how to use the Vizier catalog search features, how to use star spectral information for white balance, and to hack AnnotateImage to give me something I wanted. By 8am I came up with this and for the most part, it seems to work. I am not a programmer and do not know much about JS, but I do have a bit of experience with scripting and programming - more hacking others code than writing my own.
At first I was thinking that I'd like to be able to label all G2V stars. A simple way didn't occur to me at that time of the morning, but I did recall reading about another method of white balance using B-V magnitudes. I discovered that the NOMAD1 catalog has the appropriate information. Based on this PDF article on B-V colour calibration (http://astrophoton.com/tips/B-V_color_calibration.pdf), I learned that G2 stars have a constant B-V magnitude of 0.65. The article also talks about V-R magnitudes of 0.36 as well, although that's less relevant for some reason I don't understand yet. He goes through a method using Aladin, and uses the NOMAD1 catalog to filter out just stars with B-V in an "acceptable" range of 0.6 to 0.7, and R-V of 0.2 to 0.6.
In looking through the data that NOMAD1 output, I see there is a column available called "recommended". I assumed, and please correct me if I'm wrong, that these entries are the best ones to use. I noted they seem to all have the applicable filter data for B, V, and R. I understand that NOMAD1 is not supposed to be super-accurate, while SDSS is but covers less of the sky?
So I went into Andres' AstronomicalCatalogs.jsh file to see how he was getting the Hipparcos star information, copied that section to the end of the file, and started changing it to try to get the relevant information from the NOMAD1 catalog. Below is what I added to the end of the above file. So you add this to the end of the AstronomicalCatalogs.jsh file, save it, then run AnnotateImage on your solved file. Add "B-V WB Catalog" which should now appear in your list of catalogs available. I disable all the other annotations, just leaving this one ticked. So when you click OK, what should show up are the stars in the NOMAD1 catalog that have pretty close spectra to G2 stars. The label "name" is identical to the NOMAD1 ID. The idea would be to add a preview to one of those stars that is unsaturated, then copy that preview to your RGB image to use as the white balance reference for ColorCalibration.
I did notice something odd with the output. If I don't enter any values in the magnitude filter, I get stars being annotated. With my sample image, I then tried filtering a magnitude range, and added 1 as min and 10 as max. 2 stars showed up, but interestingly these 2 stars were not in the unfiltered output. So I need to get to the bottom of that. Perhaps someone more knowledgeable than I can see the flaw in my script?
Anyway, here's my snippet. Please feel free to comment, critique, improve, and add to the main script. I hope someone else finds it as useful as I hope it can be.
// ******************************************************************
// B-V White Balance Stars from NOMAD1
// ******************************************************************
// hacked by Troy Piggins from the Hipparcos function above
function BVCatalog()
{
this.name="B-V WB Catalog";
this.description = "Displays only stars within B-V range for white balance use";
this.__base__ = VizierCatalog;
this.__base__( this.name );
this.catalogMagnitude = 14;
this.fields = [ "Name", "V mag", "B-V mag", "V-R mag" ];
this.properties.push( ["magMin", DataType_Double] );
this.properties.push( ["magMax", DataType_Double] );
this.GetConstructor = function()
{
return "new BVCatalog()";
}
this.UrlBuilder = function(metadata, mirrorServer)
{
var fieldOfView=Math.max(metadata.width,metadata.height)*metadata.resolution;
var url=mirrorServer+"viz-bin/asu-tsv?-source=I/297&-c=" +
format("%f %f",metadata.ra,metadata.dec) +
"&-c.eq=J2000&-c.r=" + format("%f",fieldOfView) +
"&-c.u=deg&-out.form=|"+
"&-out.add=_RAJ,_DEJ&-out=NOMAD1&-out=Vmag&-out=Bmag&-out=Rmag&-out=pmRA&-out=pmDE&-out=R" +
this.CreateMagFilter( "Vmag", this.magMin, this.magMax ) ;
return url;
}
this.ParseRecord = function( tokens, epoch )
{
if( tokens.length>=8 && parseFloat(tokens[0])>0 )
{
// Only use NOMAD1 "recommended" stars. They appear to have all 3 B, V, and R
// filters.
var recommended = tokens[8].trim();
// Calculate B-V
var BV = +tokens[4].trim()-+tokens[3].trim();
// Calculate V-R
var VR = +tokens[3].trim()-+tokens[5].trim();
// Set acceptable ranges
var BVmin = 0.6;
var BVmax = 0.7;
var VRmin = 0.2;
var VRmax = 0.6;
// Filter out the stars we don't want
if( recommended.search("R") !=-1 && BVmin <= BV && BV <= BVmax && VRmin <= VR && VR <= VRmax)
{
var x = parseFloat( tokens[0] );
var y = parseFloat( tokens[1] );
if( !(x>=0 && x<=360 && y>=-90 && y<=90) )
return null;
if( epoch!=null )
{
var pmX = parseFloat( tokens[6] );
var pmY = parseFloat( tokens[7] );
var dx = pmX*(epoch-2000)/3600000 * Math.cos( y*Math.PI/180 );
var dy = pmY*(epoch-2000)/3600000;
x += dx;
y += dy;
}
var name = tokens[2].trim();
var record = new CatalogRecord( new Point( x, y ), 0, name, parseFloat( tokens[3] ) );
record["V mag"]=tokens[3].trim();
record["B-V mag"]=BV+"";
record["V-R mag"]=VR+"";
return record;
} else
return null;
} else
return null;
}
}
BVCatalog.prototype = new VizierCatalog;
__catalogRegister__.push( (new BVCatalog).GetConstructor() );
-
The idea of doing the color calibration with the assistance of a photometric catalog is very interesting. The annotation script is designed for reusing the implementation of the catalogs so it should be easy to use it for writing a calibration script. I don't think that adding calibration functionality to the annotation script would be convenient. It would be better to have an independent script.
I am integrating your catalog in the script. I have made a few modifications for making it more general. I hope to have it finished by this night. I am doing also other changes that need more tests.
I have removed the check for R's in the field Recommended because I have not been able to find any "recommended" stars. Now I only exclude the problematic stars ("R=*"). Also, I have added filters to the VizieR query so it returns only stars with values for Vmag, Bmag and Rmag.
-
This seems to be interesting not only for color calibration, but also for brightness calibration. Part of a mosaic problem that I recently investigated http://pixinsight.com/forum/index.php?topic=4105.msg28803#msg28803 was that the different panels had different calibrations, and that LinearFit/FrameAdaption only has limited success in doing a relative calibration due to small overlaps and some issues in the original data. I was wondering if the ImageSolver plus some catalog could be used for calibrating them all to the same brightness levels.
Georg
-
At first I was thinking that I'd like to be able to label all G2V stars. A simple way didn't occur to me at that time of the morning, but I did recall reading about another method of white balance using B-V magnitudes. I discovered that the NOMAD1 catalog has the appropriate information. Based on this PDF article on B-V colour calibration (http://astrophoton.com/tips/B-V_color_calibration.pdf), I learned that G2 stars have a constant B-V magnitude of 0.65. The article also talks about V-R magnitudes of 0.36 as well, although that's less relevant for some reason I don't understand yet. He goes through a method using Aladin, and uses the NOMAD1 catalog to filter out just stars with B-V in an "acceptable" range of 0.6 to 0.7, and R-V of 0.2 to 0.6.
Hi,
I never trusted this method,. Let me put one example.
We have this M106 picture:
(http://www.astrofoto.es/astrofoto/foros/nomad_cal_1.jpg)
The color has been calibrated using the entire galaxy. In this particular picture, this calibration results in a slightly green color, but it doesn't matter for this example. As you say, in the PDF they have a tolerance for selecting stars of 0.2 mag in the B-V color index, and 0.4 in the R-V. If we transform these ranges to linear (2.5118^0.2 and 2.5118^0.4), we get that .2 magnitudes means an increase in flux of 20.2%, and the increase in flux for .4 magnitudes is 44.5%!
Let's transform the above image to really understand what means the specified tolerance in terms of the resulting color balance. If we multiply the red channel by 1.445 and the blue channel by 1.202, we get this image:
(http://www.astrofoto.es/astrofoto/foros/nomad_cal_2.jpg)
If we saturate a bit the colores... Then we have these images:
(http://www.astrofoto.es/astrofoto/foros/nomad_cal_3.jpg)
(http://www.astrofoto.es/astrofoto/foros/nomad_cal_4.jpg)
I'm not particularly happy with the idea of having this amount of error in my color calibration. Even if we have ten stars and make the average of them. On the other hand, the NOMAD color have nothing to do with your instrumental color. The resulting color using the same calibration stars but different cameras and filters will be also different. This method can be only made by people that don't know/understand what's absolute photometry.
And, at last, I don't like the idea of mixing astrophotography and religion. This method has been done to force the idea of calibrating the color with the sunlight more happy and feasible. To me, the Sun it's only a star, not a god...
Regards,
Vicent.
-
I agree with Andres, if someone wants to have a color calibration tool in PI based on B-V or V-R color index data, then make it a separate script/tool. I hope this wonderful script can continue to be devoted to providing information, ie names, color indices, etc. Parenthetically, IMHO, the current color calibration tool in PI is terrific and for me, works great, much better or at least more consistently than when I've tried color calibration based on finding G2V stars in an image to determine the RGB ratio using ExCalibrator.
Andres, in this script I would hope you can configure it to show B-V and V-R ratios, or just B, V, and G mags, for as many stars in an image as possible. It has been my practice to use a near finished image and check the accuracy of the star color using these values. In this way, a star with a B-V index, for example, greater than 0.65 should be red and one less than 0.65 should be blue, and one with a value close to 0.65 should be white. So, if possible allow all values to be shown, ie an option to have the data unfiltered.
Steve
-
Parenthetically, IMHO, the current color calibration tool in PI is terrific and for me, works great, much better or at least more consistently than when I've tried color calibration based on finding G2V stars in an image to determine the RGB ratio using ExCalibrator.
That's what I'm talking about. No one can say that a method with 40%+ error is a robust one.
Regards,
Vicent.
-
New version of AnnotateImage:
- Multiple labels per object
- NOMAD-1 catalog with optional B-V filtering for white balance
- Fields B, V and B-V in Tycho-2 catalog
Juan, I think this script is ready for publishing it. At least, the solver script should be updated since the published version with the update server doesn't work.
-
Vicent, thankyou so much for your experienced and educational reply. I understand what you're getting at about tolerances and variability. Those ranges are only a recommendation by the author of that paper, so I guess the end user could tighten them up if desired. You would have far more knowledge than I on the matter of accuracy of the overall method.
I've noticed you recommending use whole galaxies as the white balance reference several times. But I rarely shoot galaxies to date, mostly nebulae. Do you recommend the G2V method as more accurate? If there aren't any G2V stars in the field of view, what other candidates do you recommend as acceptably close enough?
I would like to point out that my intention was never to make this annotation script a colour calibration tool. Merely to use it to highlight/annotate potential colour calibration stars. This could be extended to whatever method the user wants. If someone can find a suitable way of doing similar for G2V stars, that'd be awesome.
I agree the ColorCalibration tool is working wonders for me. But I have a bit of a hard time finding stars to white balance on for cluster or nebulae shots. I thought this would be a good way of assisting using the available features, that's all.
-
Is it possible to use Annotation script without Internet ?
-
Is it possible to use Annotation script without Internet ?
Yes, but in this case you can only use grid layer, text layer, NGC/IC catalog and custom catalog.
-
custom catalog.
I have downloaded Tycho-2. (http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/259) Is it possible convert the Tycho-2 to custom catalog?
-
Hi Andres!
I have several 'Custom Catalog'.
Could it be possible, to create a user defined name instead of 'User defined catalog'?
Kind regards.
Herbert, Austria
-
custom catalog.
I have downloaded Tycho-2. (http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/259) Is it possible convert the Tycho-2 to custom catalog?
Tycho-2 has 2.5 million objects. I don't know if the Javascript engine can load so many objects and how much time it would need. It would be an interesting test that you could do.
In any case, IMO the best way for creating custom catalogs is filtering the original catalog using Vizier so that it contains only the area of interest. Then using Excel (http://pixinsight.com/forum/index.php?topic=3966.msg28314#msg28314) is easy to convert it to the format of the custom catalogs (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257).
-
Tycho-2 has 2.5 million objects. I don't know if the Javascript engine can load so many objects and how much time it would need. It would be an interesting test that you could do.
MaximDL+PinPoint do it without problem, so IMO PixInsight should do it too. :)
In any case, IMO the best way for creating custom catalogs is filtering the original catalog using Vizier so that it contains only the area of interest.
Sometimes, I go to place in mountain where no electricity, no cellular, no Internet and of course no Vizier. And when I take some photo of new area and I want to know what is it in my image or etc. I should use other software for inspecting my image. :-\
Maybe possible implement Vizier to PixInsight ;) It seems to me stars-generator - this is a good candidate.
-
MaximDL+PinPoint do it without problem, so IMO PixInsight should do it too. :)
But they don't do it in Javascript using voluntary time. ;)
In any case, a way for reading text files by lines would help a lot. Currently, the script has to load the entire file into memory and then split it by lines. If I could read the file by lines, I could process them independently without loading all into memory at the same time.
Also, I doubt that Excel can load 2.5 million rows, so it would be necessary a script for converting the format.
-
Andres,
This is a wonderful addition to PI - thank you so much for your hard work! Somehow I missed this new script until now - perhaps Juan can publicize it a bit more in the Releases forum.
I'm giving a short PI tutorial at a conference next week, and will use the Annotate Script to illustrate the power of user additions to PixInsight.
Thanks again,
Sean
-
I just 'got around' to trying it last evening as well.
Bravo, Andres! If you're ever in Pennsylvania I'm buying :D
-
Andres,
FYI: maybe I have an old version of your script, but in my installed version v1.11 I am getting an error on line 1597 when I select 'Generate Overlay'. A fix seems easy by making 'currentItem' a function parameter.
Thanks,
Mike
-
Feature request: Log number of catalog objects whose coordinates actually lie within the bounds of the image. The current logged catalog sizes are sometimes a fair bit larger than the actual number of objects visible (example, 547 PGC's logged but only 169 visible).
Thanks,
Mike
-
Feature request: Log number of catalog objects whose coordinates actually lie within the bounds of the image. The current logged catalog sizes are sometimes a fair bit larger than the actual number of objects visible (example, 547 PGC's logged but only 169 visible).
FYI: maybe I have an old version of your script, but in my installed version v1.11 I am getting an error on line 1597 when I select 'Generate Overlay'. A fix seems easy by making 'currentItem' a function parameter.
I have fixed the bug and implemented the feature. They will be available the next time that I release a new version.
Thanks for your feedback.
-
That´s true, a real masterpiece. Franz(iii)
-
It looks like really great! :)
Unfortunately, sometimes ImageSolver fails on widefield shots...
Example is here, surrounding of the Cats Paw in Scorpius, it is solved by Astrometry.net (see comments on Flickr (http://www.flickr.com/photos/ytoropin/7177512642/)), but unfortunately I can't solve it with ImageSolver...
Direct link to 100% resolution (http://farm8.staticflickr.com/7234/7177512642_6bdff6c672_o.jpg), lens with 105mm focus, pixel size is 6.05um x 6.05um...
Any ideas/advices how to handle it?
Thanks a lot,
Yuriy
-
It looks like really great! :)
Unfortunately, sometimes ImageSolver fails on widefield shots...
Example is here, surrounding of the Cats Paw in Scorpius, it is solved by Astrometry.net (see comments on Flickr (http://www.flickr.com/photos/ytoropin/7177512642/)), but unfortunately I can't solve it with ImageSolver...
Direct link to 100% resolution (http://farm8.staticflickr.com/7234/7177512642_6bdff6c672_o.jpg), lens with 105mm focus, pixel size is 6.05um x 6.05um...
Any ideas/advices how to handle it?
Thanks a lot,
Yuriy
The image gets solved without problems using these parameters as starting point:
- RA: 17h 0' 0"
- Dec: 36º 0' 0" S
- Focal: 105mm
- Pixel size: 6.03
- Local Catalog, limit magnitude 8
- Star sensitivity: -1
Image Plate Solver script version 1.6
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
-0.003305025416 -0.000073618119 +4.452665516961
+0.000074914137 -0.003304354484 +6.314173055633
+0.000000000000 +0.000000000000 +1.000000000000
Resolution ........ 11.900 arcsec/pix
Rotation .......... 1.293 deg
Focal ............. 104.52 mm
Pixel size ........ 6.03 um
Field of view ..... 8d 36' 3.5" x 12d 47' 56.4"
Image center ...... RA: 17 13 04.984 Dec: -36 17 39.74
Image bounds:
top-left ....... RA: 17 33 25.458 Dec: -29 55 18.11
top-right ...... RA: 16 54 04.586 Dec: -29 44 34.37
bottom-left .... RA: 17 35 31.303 Dec: -42 37 26.17
bottom-right ... RA: 16 49 11.382 Dec: -42 24 51.84
===============================================================================
-
Thanks a lot, Andres!
It works for me with these parameters also. Cool!
...
Looks like the major difference is "limit magnitude 8" vs "limit magnitude 12" set by default...
Any mnemonic rule which limit magnitude should be used?
Thanks a lot again,
Yuriy
PS: it will be great if the latest version of script will be available in the first post of the theme so it will be really easy to find them. Or - have I missed something? :)
-
by the way i had the idea to use the astrometry.net code to solve images and then use the solution provided by that program to drive the annotation script. i have not had time to really understand why it does not work, but the problem would seem to be with solve-field itself. the FITS file it produces with the solution in the header has been mirrored on one axis and needless to say if you annotate the original image with this solution the results are incorrect. anyway, at some point i'll get some free time and look at it.
-
PS: it will be great if the latest version of script will be available in the first post of the theme so it will be really easy to find them. Or - have I missed something? :)
When I have a little time I will start a new thread with the instructions and tips and i will ask Juan to pin it. Anyway, the last version is available through the update system.
-
It will be great, thanks a lot, Andres!
-
The image gets solved without problems using these parameters as starting point:
- RA: 17h 0' 0"
- Dec: 36º 0' 0" S
- Focal: 105mm
- Pixel size: 6.03
- Local Catalog, limit magnitude 8
- Star sensitivity: -1
Hello, I have a question.
The parameters of Dec and RA, what object you chose? or, is there any program that computes these coordinates of the center?
Thanks
-
Hello, I have a question.
The parameters of Dec and RA, what object you chose? or, is there any program that computes these coordinates of the center?
Thanks
The script computes the exact coordinates of the center. It is not a blind solver so you have to input in the dialog a starting point, the more near the center the better. These starting coordinates can be got from the telescope coordinates in the FITS header, with the "search" dialog or with whichever method you could.
When you take a photo you usually know what are you pointing at. You only have to find the coordinates using the wikipedia, wikisky, StarryNight or any other source.
-
I have been trying to get the Image Solver script to work on an image of the Leo Triplet, but the script fails, unfortunately.
I have put in the coordinates of M65, and the focal length and pixel size of my imaging system. It can't seem to `find an initial set of putative star pair matches'. Do I need to input the exact coordinates of the center of my frame?
I'm probably making some sort of simple mistake, but I'm not sure what it is. Does it matter if my image is linear or stretched? I don't think I have a mirror-flip in my image, either.
- Marek
-
Got it!
I used the coordinates of a star close to the center of my FOV. (I got the coordinates and the exact epoch from SkySafari Pro 3 on my iPad.) That allowed ImageSolver to plate-solve my image quite nicely. The Annotation script then overlaid the data sets, and it looks quite nice!
Thank you very much for such a nice script!
- Marek
-
Hi Andres!
The GSC2.3 catalog at Vizier has a field called "Class". Its either 0 or 3. (0 for stellar and 3 for nonstellar)
Is there a possibility to imbedd the access to this catalog in the annotation script?
The advantage i see is that it would enable to notate galaxies which are much weaker than those in the PGC catalogue
by using the Class 3 data of the GSC2.3 catalogue.
We produced an image of the ComaCluster where there are many galaxies between Mag19 and 20.
I could only notate a part of them. I downloaded the area from the GSC2.3 catalog into Excel
and could annotate the fainter galaxies. But, despite the excel file covers the whole area,
the annotation annotes only a triangel in the upper middle part of the image. Probably user error...
Using the comfort of annotation with GSC2.3 for the faint galaxies instead of my manual download, convert
and error in handling would be great.
Thanks again for such a wonderful script already!!
Aloha
Gerald
-
actually along these lines, if i go to the hyperleda website and ask for a portion of the sky i am interested in, i see many more galaxies in the website output than what shows up after annotation. is the hyperleda catalog that's bundled with the script somehow reduced in size?
-
actually along these lines, if i go to the hyperleda website and ask for a portion of the sky i am interested in, i see many more galaxies in the website output than what shows up after annotation. is the hyperleda catalog that's bundled with the script somehow reduced in size?
The script uses the catalog VII/237/pgc directly from Vizier. The script does not bundle data apart from the NGC/IC catalog.
I have done several tests and I can not find missing galaxies. I would need an example of this effect so I can reproduce it and then fix it.
-
i happened to solve an image of a contact on flickr. i don't have permission to redistribute it, but here's a thumbnail of the solved image together with a thumbnail of what i get from the hyperleda server.
this is the area of M51. the two FOVs are not the same, but assuming the green circles in the hyperleda output are galaxies in their database, you can see that many of the galaxies are not annotated in the pixinsight image.
-
I don't know where do you have got that image. The annotation script shows all the objects in the catalog VII/237/pgc.
The attached image compares the result of annotation script with the Aladin viewer that uses the same catalog as me. The fields are slightly different but it can be seen that both images have annotated the same galaxies in the field that both have in common.
-
well maybe hyperleda is different than the PGC catalog then. i am away from my main computer but i can send you the URL that i used to generate that image. it's from the hyperleda website, though.
assuming this is just a matter of using a different catalog, what format should a catalog be in in order for the annotate script to use it? does it have to be online somewhere or can it be stored locally? a full catalog of galaxies is probably huge.
-
well maybe hyperleda is different than the PGC catalog then. i am away from my main computer but i can send you the URL that i used to generate that image. it's from the hyperleda website, though.
assuming this is just a matter of using a different catalog, what format should a catalog be in in order for the annotate script to use it? does it have to be online somewhere or can it be stored locally? a full catalog of galaxies is probably huge.
The server of Hyperleda (http://leda.univ-lyon1.fr/ (http://leda.univ-lyon1.fr/)) has more objects than are available in the catalog VII/237/pgc of VizieR. In the catalog of Vizier there are only the galaxies of the PGC catalog while in the server of Hyperleda there is a mix of stars and galaxies from different sources.
Since the server of Hyperleda is not easily integrated in the script I will add a couple of additional catalogs from Vizier:
- SDSS R8 (II/306/sdss8 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?II/306))
- GSC2.3 (I/305 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?cat=I%2F305))
In both catalogs, the user will be able to filter the catalog by magnitude and object class (star/galaxy).
-
yes, you are right, i thought everything in the hyperleda catalog was PGC but there are multiple designation types in there. i could not figure out how to get the hyperleda catalog, so thanks for adding those other sources.
-
Since the server of Hyperleda is not easily integrated in the script I will add a couple of additional catalogs from Vizier:
- SDSS R8 (II/306/sdss8 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?II/306))
- GSC2.3 (I/305 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?cat=I%2F305))
In both catalogs, the user will be able to filter the catalog by magnitude and object class (star/galaxy).
Thanks Andres for your work to make the GSC2.3 catalogue accessible with Class and Magnitude selection.
This will be a great progress for annotation of weak galaxies.
Aloha
Gerald
-
Hi,
I try to solve the next image:
http://www.flickr.com/photos/14721988@N02/6976343764/sizes/k/in/photostream/ (http://www.flickr.com/photos/14721988@N02/6976343764/sizes/k/in/photostream/)
but I don't seem to get it solved.
Settings:
RA: 13 29 52.598
Dec: 47 11 42.93
Epoch: 2000 1 1
Focal distance :654.667
Resolution: 2.3 arcsec/pixel
Pixel size: 7.3
Limit magnitude: 12
Star sensitivity: 1.01
Show stars (does show the stars, not the noise)
Maximum iterations: 8
Update FITS keywords
Add WCS keywords
astrometry.net
Hello, this is the blind astrometry solver. Your results are:
(RA, Dec) center:(202.392357488, 47.205237112) degrees
(RA, Dec) center (H:M:S, D:M:S):(13:29:34.166, +47:12:18.854)
Orientation:86.69 deg E of N
Pixel scale:2.30 arcsec/pixel
Parity:Reverse ("Left-handed")
Field size :39.21 x 29.25 arcminutes
-
Hi,
I try to solve the next image:
http://www.flickr.com/photos/14721988@N02/6976343764/sizes/k/in/photostream/ (http://www.flickr.com/photos/14721988@N02/6976343764/sizes/k/in/photostream/)
but I don't seem to get it solved.
Your starting parameters are wrong. It seems that you has sent to Astronometry.net a half size version of the image. The resolution of the image of the link is 1.15" instead 2.3".
Using the parameters of the attached screenshot, the result is:
Image Plate Solver script version 1.6
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
+0.000019408940 +0.000319144419 -0.263694215186
-0.000319912238 +0.000019277221 +0.312870900766
+0.000000000000 +0.000000000000 +1.000000000000
Resolution ........ 1.152 arcsec/pix
Rotation .......... -93.395 deg
Focal ............. 1306.60 mm
Pixel size ........ 7.30 um
Field of view ..... 39' 20.1" x 29' 20.9"
Image center ...... RA: 13 29 34.623 Dec: +47 12 13.19
Image bounds:
top-left ....... RA: 13 28 00.918 Dec: +47 30 57.09
top-right ...... RA: 13 28 16.019 Dec: +46 51 39.18
bottom-left .... RA: 13 30 54.248 Dec: +47 32 43.79
bottom-right ... RA: 13 31 07.229 Dec: +46 53 24.56
===============================================================================
-
I got it to work.
Now, how did you get the number for the resolution?
-
I got it to work.
Now, how did you get the number for the resolution?
I guessed it but for you it should be easy. You should know the focal length of your tube and the pixel size of the camera.
-
Hello Andres,
today, I used your excellent script on the image of Whirlpool galaxy. I have the problem I did not experienced before - several duplicates between NGC and PGC catalogs, not removed even with "Removed Duplicated objects" checked (including M51). Is there a way to fix it?
thanks a lot, Zbynek
-
Hello Andres,
today, I used your excellent script on the image of Whirlpool galaxy. I have the problem I did not experienced before - several duplicates between NGC and PGC catalogs, not removed even with "Removed Duplicated objects" checked (including M51). Is there a way to fix it?
What is the resolution of the image?
Andrés.
-
Hi Andres,
I think I found a bug, or at least an oddity. I've noticed with my images that if I overlay Tycho stars, that in the corners the annotations don't quite line up with my image's stars. I have just been putting that down to distortion in my optics and the field not being flat.
But tonight I was playing around with a star generated image. I generated a star field, then solved the generated field, then annotated that image. The annotations in the star generated image are slightly off the stars in that too.
-
What is the resolution of the image?
Andrés.
2823x1905 pixels
-
What is the resolution of the image?
Andrés.
2823x1905 pixels
I need the resolution in seconds/pixel, not the image size.
-
I need the resolution in seconds/pixel, not the image size.
Ah, sorry. It's 1.507 arcsec/pix according to your ImageSolver script.
-
Ah, sorry. It's 1.507 arcsec/pix according to your ImageSolver script.
I can't reproduce your problem, however in the screen capture of your first post I can see that you are using a quite old version of the script. Could you try again with the last version? It is the 1.11 version and it was distributed with the update system. It should be in the menu "Script\Render".
When you can confirm that this problem is not present in the 1.11 version, I will publish a new version with new catalogs and a few changes.
-
Hi Andres,
thanks for your help. Somehow I mixed up the old version of the script I downloaded long time ago with the new version distributed through update system. Latest version works without problem, no duplicates. My mistake, sorry.
regards, Zbynek
-
New version (1.2) of AnnotateImage:
- The user can choose the filter used in the magnitude filter.
- Catalog SDSS Release 8 with object class filter (star/galaxy)
- Catalog GSC 2.3 with object class filter (star/non-star)
- Fixed the magnitude filter in some catalogs
- Fixed problem in the combo OutputMode
- After downloading a catalog it logs the number of objects inside the image
-
Hi Andres
I downloaded the script in your latest post. However, I get a different display window: No magnitude filter or Class and no Label Text pull downs.
Geoff
-
Hi Andres
I downloaded the script in your latest post. However, I get a different display window: No magnitude filter or Class and no Label Text pull downs.
Geoff
The magnitude filter selector is only available for the catalogs that have more that one magnitude filter.
The class of object can be selected only for the catalogs that have a field with this information: SDSS and GSC.
-
OK
That works. Thanks Andres.
-
Andres!
Thank you very much for the update.
Its a fantastic tool. You are doing magic.
The including of the new catalogues is major step forward in my
opinion and makes me happy.
Aloha
Gerald
-
Andres,
A small issue: I notice star markers decentered from star barycenters in some subs. Maybe a pixel or so offset. Is this expected? Maybe there is an off by one or roundoff error somewhere. Script version v1.11.
Files in forum shared files/mschuster/Annotation. Both imager and guider subs. Plate solved by PinPoint. I think PinPoint reported plate solved RMS error roughly 0.25 pixel for both subs (0.5" RMS for 2.1"/px imager, 1.5" RMS for 5.8"/px guider).
Thanks,
Mike
-
A small issue: I notice star markers decentered from star barycenters in some subs. Maybe a pixel or so offset. Is this expected? Maybe there is an off by one or roundoff error somewhere. Script version v1.11.
The drawing functions of PixInsight use internally integer values for the pixel coordinates. This produces a roundoff error of half a pixel.
-
This produces a roundoff error of half a pixel.
How about for stars scanning the image in a small window centered on the barycenter for the brightest pixel and center it at that integer pixel?
-
Andres,
A small issue: I notice star markers decentered from star barycenters in some subs. Maybe a pixel or so offset. Is this expected? Maybe there is an off by one or roundoff error somewhere. Script version v1.11.
Files in forum shared files/mschuster/Annotation. Both imager and guider subs. Plate solved by PinPoint. I think PinPoint reported plate solved RMS error roughly 0.25 pixel for both subs (0.5" RMS for 2.1"/px imager, 1.5" RMS for 5.8"/px guider).
Thanks,
Mike
Mike, please read this thread: http://pixinsight.com/forum/index.php?topic=4371.0 (http://pixinsight.com/forum/index.php?topic=4371.0). There is a small bug in StarAlignment that produces an error of 0.5 pixels in ImageSolver. This bug plus the unavoidable roundoff of the drawing primitives can account for errors up to one pixel.
It should be fixed when Juan release the next version of StarAligment.
-
Thanks Andres. I am using StarAlignment coords as input to DynamicPSF. I may have to tweak my script.
Also another question: Would it be possible to add LBN and LDN catalogs to Annotation? If you think so I may try doing this myself to learn how your script does this querying.
Mike
-
I have published a new version of AnnotateImage alongside the new script CatalogStarGenerator. It has a couple of improvements that I think that are very useful.
-
Hi Andres!
First of all, i want to thank you for this impressive code! It's very useful and neat script to have in the arsenal.
Now, when I'm building my own astro website, this tool became very handy and I was able to solve and Annotate images with 17mm FL.
Until i came to this specific widefield image and found that something wrong with the script.
On the first image i draw just the Grid and NGC Objects and as you can see they've been created just on the left side, which is up to 24 hour RA. No matter what i do, it won't Annotate whole image.
Second problem, is if you look at 36° DEC mark, you will notice that object names piling up and got messy. Although I used small image scale and small fonts to separate the Names, they still got written above each other and became unreadable.
Check for example NGC 7446 and 7449, they almost fused on the same spot, i think there should be option to separate the object names so they don't get written on each other. Even manually moving them with mouse if possible.
Also i think it would be good to have the ability to filter magnitude or size of the objects, like with stars. Meaning, on such wide image there are so many small objects or dim objects, that are not visible and it might have no reason to mark them at all. Then you might draw just large or bright objects circles and keep annotation image clear.
And now to the another big problem on the same image. When i enabled PGC catalog, i got this piled up cone with all objects as you can see on the second image. I can send you that clean image to test over if you want.
-
Hi,
it seems that there is a bug in images that cross the 0h/24h boundary. I will have to check it.
Solving the overlapping between labels is not easy and I probably won't fix it in the short term. However if this is a big problem for you, you can save the annotation as a SVG overlay, edit it with any SVG editor (as Inkscape) and then merge it with the sky image.
The third problem (piled PGC objects in an small area) is caused because you are asking for very faint galaxies. Since your image covers a very wide field there are millions of galaxies in it. Also, the catalog servers that AnnotateImage uses can only return about 100 000 elements. This is the cause for the blue smear in an small area: the server returns only the first hundred of thousand of stars and they are in the same area of the sky. This limitation is not grave in my opinion because if the script tries to paint more than a few thousands of objects the result will be a smear.
For solving this problem you have to filter the PGC catalog using a smaller magnitude. You can start with 9 and increase it in small steps. The Preview button will be handy for this.
-
Thank you, Andres
but there is no Magnitude Filter for PGC Hyperleda Catalog? Using v1.6
that would be nice to have such a filter for NGC/IC Catalog as well.
-
Thank you, Andres
but there is no Magnitude Filter for PGC Hyperleda Catalog? Using v1.6
that would be nice to have such a filter for NGC/IC Catalog as well.
You are right. The catalogs PGC and NGC/IC have no magnitude so there is nothing that I can do. You can read the description of PGC catalog here:
http://cdsarc.u-strasbg.fr/viz-bin/Cat?VII/237 (http://cdsarc.u-strasbg.fr/viz-bin/Cat?VII/237)
-
Alright then,
it's still very usable as it is, when annotating DSO images!
-
Hi Andres!
The catalogdata for AnnotateImage are linked to the vizier homepage.
This is comfortable!
Is it possible to get the converted catalogs (in the format, which is nessecary for your script)
for download? My Lap hasnt always a connection to the net.
Thank you and best regards.
Herbert, Austria
-
Is it possible to get the converted catalogs (in the format, which is nessecary for your script)
for download? My Lap hasnt always a connection to the net.
It would not be easy because some catalogs are huge (>10GB) and JavaScript is not very fast. I would have to program indexes and a search mechanism. This is a lot of work and I have currently other priorities.
I will think about it but I can't promise anything.
-
Hi Andres,
thanks for this very useful script!
I have a couple of questions regarding the script:
- so far the allowed WCS projection is limited to TAN, do you have plans to extend the script to other projections like AIT for really widefield images?
- sometimes the scripts breaks with the following error message:
Downloading Vizier data:
http://vizier.u-strasbg.fr/viz-bin/asu-tsv?-source=IV/27A/catalog IV/27A/table3&-c=337.283333 63.966667&-c.r=111.805556&-c.u=deg&-out.form=|&-joincol=IV/27A/catalog.HD&-joincol=HD&-outjoin=IV/27A/catalog.HD&-out=RAJ2000&-out=DEJ2000&-out=Fl&-out=Bayer&-out=Cst&-out=Name&-out=Vmag&-out=HIP
223508 bytes transferred in 0.46 s @ 472.80 KB/s
*** Error [222]: /Users/wens02/Desktop/PixInsight-1.8RC4.app/Contents/src/scripts/Solver+Annotate/AstronomicalCatalogs.jsh, line 330: TypeError: posI is null
- is it possible to scale down a plate solved image with integer resample and patch the FITS header afterwards so that the scaled down image is still able to annotate? I think I have to edit the NAXIS1/NAXIS2 values after rescaling, but these are read-only and contain the old (wrong) values.
Attached is an annotated TAN projection of a part of the milky way mosaic I'm currently working on, for this image your script works perfect! :-)
Regards,
Rüdiger
-
- so far the allowed WCS projection is limited to TAN, do you have plans to extend the script to other projections like AIT for really widefield images?
Yes. I have plans to add more projections in the future. I don't know when, but I think I will do it.
I have nearly ready a new version of ImageSolver that improves greatly the precision of the annotation and that it is also able of modeling the distortions of the optics. This new script will allow in the future new functions as reprojection of images or mosaic stitching based on coordinates of images with very little (or even none) overlapping.
- sometimes the scripts breaks with the following error message:
Downloading Vizier data:
http://vizier.u-strasbg.fr/viz-bin/asu-tsv?-source=IV/27A/catalog IV/27A/table3&-c=337.283333 63.966667&-c.r=111.805556&-c.u=deg&-out.form=|&-joincol=IV/27A/catalog.HD&-joincol=HD&-outjoin=IV/27A/catalog.HD&-out=RAJ2000&-out=DEJ2000&-out=Fl&-out=Bayer&-out=Cst&-out=Name&-out=Vmag&-out=HIP
223508 bytes transferred in 0.46 s @ 472.80 KB/s
*** Error [222]: /Users/wens02/Desktop/PixInsight-1.8RC4.app/Contents/src/scripts/Solver+Annotate/AstronomicalCatalogs.jsh, line 330: TypeError: posI is null
Could you retest it using the version included in PI1.8RC5 please?
- is it possible to scale down a plate solved image with integer resample and patch the FITS header afterwards so that the scaled down image is still able to annotate? I think I have to edit the NAXIS1/NAXIS2 values after rescaling, but these are read-only and contain the old (wrong) values.
I could do it, but I think that this should be done by the geometric processes of PI themselves.
Attached is an annotated TAN projection of a part of the milky way mosaic I'm currently working on, for this image your script works perfect! :-)
Thanks!!
-
Could you retest it using the version included in PI1.8RC5 please?
I updated to 1.8RC5 on my MacBook, but get the same error message when trying to activate the named stars layer or any other layer that needs vizier data on a slightly extended version of my milky way project. The grid and NGC/IC layer is still pixel exact.
Downloading Vizier data:
http://vizier.u-strasbg.fr/viz-bin/asu-tsv?-source=IV/27A/catalog IV/27A/table3&-c=337.283333 63.966667&-c.r=111.805556&-c.u=deg&-out.form=|&-joincol=IV/27A/catalog.HD&-joincol=HD&-outjoin=IV/27A/catalog.HD&-out=RAJ2000&-out=DEJ2000&-out=Fl&-out=Bayer&-out=Cst&-out=Name&-out=Vmag&-out=HIP
223509 bytes transferred in 0.57 s @ 383.40 KB/s
TypeError: posI is null
A screenshot of the embedded WCS data of the problematic picture is attached.
Rüdiger
-
I recently labeled with named stars, both on Windows and Linux, and did not see these error messages. Mac-specific?
Georg
-
I updated to 1.8RC5 on my MacBook, but get the same error message when trying to activate the named stars layer or any other layer that needs vizier data on a slightly extended version of my milky way project. The grid and NGC/IC layer is still pixel exact.
I know where the error is. In fact, I fixed it last week. It happens in all catalogs when the image has a very wide field.
If it is very urgent I could release a temporal fix until ImageSolver 2.0 is ready. Can you wait a week or two?.
Also, it would be very useful for testing ImageSolver 2.0 if you could send me one of frames that compose you mosaic. I only need a calibrated RAW image and its approximate center and resolution.
-
If it is very urgent I could release a temporal fix until ImageSolver 2.0 is ready. Can you wait a week or two?.
No it's not urgent. I can wait until version 2.0 is ready to release, even if it takes longer than a week or two.
Also, it would be very useful for testing ImageSolver 2.0 if you could send me one of frames that compose you mosaic. I only need a calibrated RAW image and its approximate center and resolution.
I will send you a download address later. Currently I don't have access to the calibrated RAWs
Rüdiger
-
I will send you a download address later. Currently I don't have access to the calibrated RAWs
Thanks!
-
Hi Andres!
Answer to #231
Is it possible to get the converted catalogs (in the format, which is nessecary for your script)
for download? My Lap hasnt always a connection to the net.It would not be easy because some catalogs are huge (>10GB) and JavaScript is not very fast. I would have to program indexes and a search mechanism. This is a lot of work and I have currently other priorities.
I will think about it but I can't promise anything.
Ok - its a pity, but thanks for your reply and again: thank you for this great tool!!
Best regards.
Herbert, Austria
-
Hi Andres!
Answer to #231
Is it possible to get the converted catalogs (in the format, which is nessecary for your script)
for download? My Lap hasnt always a connection to the net.It would not be easy because some catalogs are huge (>10GB) and JavaScript is not very fast. I would have to program indexes and a search mechanism. This is a lot of work and I have currently other priorities.
I will think about it but I can't promise anything.
Ok - its a pity, but thanks for your reply and again: thank you for this great tool!!
Best regards.
Herbert, Austria
Herbert,
have you tried to use custom catalogs? Please read http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257)
You can download the catalogs that you want from Vizier, process them using Excel or similar and save them in the format used by AnnotateImage.
-
I know its probably a toy only for "real" astrophotographers : Would it be possible to optionally draw the constellations (Orion, Ursus Major, ... connecting lines only) with the Annotation script? Would be nice, mostly for wide fields.
Georg
-
I know its probably a toy only for "real" astrophotographers : Would it be possible to optionally draw the constellations (Orion, Ursus Major, ... connecting lines only) with the Annotation script? Would be nice, mostly for wide fields.
Georg
I have not done it yet because currently ImageSolver can not solve wide field images reliably. However, the next version of ImageSolver will be able to solve them. Drawing the constellations would be a reasonable next step.
-
Rüdiger has lend me an image taken with a Canon EF 1,2/50mm L @ f2,8. I have solved it with ImageSolver 2.0 using 5th degree polynomials.
This image is an animated GIF with a comparison between the old algorithm and the new one:
(https://dl.dropbox.com/u/71653208/FotosForum/Solver2_ex1.gif)
The second image is a representation of the distortions that the algorithm detects on the image. The red lines exaggerate 10 times the distortion.
(https://dl.dropbox.com/u/71653208/FotosForum/Solver2_ex1_Distortions.png)
-
Well done! But a nit: Higher degree polys tend to "ring" or "oscillate". It looks to me like there is a circular zone of no distortion in your map. Is this correct?
Mike
-
Well done! But a nit: Higher degree polys tend to "ring" or "oscillate". It looks to me like there is a circular zone of no distortion in your map. Is this correct?
Mike
I don't understand what do you mean. The distortion image shows an oscillation. If you draw a graph or a radial cross section, the distortion goes up and down. The degree of the polynomials can be selected by the user, and for many images a lineal polynomial is still good enough.
The polynomials are calculated using a least squares linear multiple regression algorithm. If the center of the image shows no distortion is because the best solution is to consider that the center has no distortion.
The attached image is the distortion of a 105mm objective. The minimum distortion is not at the center.
-
Thanks Andres, Just wondering:
About 80% out toward the edge, there is a ring of little distortion. Is this real? Maybe it would help to see an animation of the entire image and a matching map.
IMO solutions that are best in the least squares sense can still oscillate - the residual error of the model oscillates across the data. Just wondering if this is the case or not.
Is it possible to generate a map of residuals? Also, in the map arrows would help visualization (which direction is the local distortion offset?).
Mike
-
The script generates two debug images: the distortion map that you have already seen and a residuals image. In the residuals image the script draws a green cross at the predicted position of the star and a red line from the predicted position to the real position. When the residuals are zero, the red line degenerates to a point. The residuals image for Rudiger's image is this (click on it to open at full size):
(https://dl.dropbox.com/u/71653208/FotosForum/Solver2_ex1_Residuals.jpg) (https://dl.dropbox.com/u/71653208/FotosForum/Solver2_ex1_Residuals.jpg)
In the distortion map, the red lines start always at the center of each cell. I prefer not to add an arrow because they would obfuscate the image in the areas with little distortion.
-
I have just finished a new version of AnnotateImage. This version has two new layers:
- Constellation lines: The layer draws on the image the asterisms of the constellations.
- Constellation borders: The layer draws on the image the borders between constellations.
These layers are useful for wide field images together the catalog layers "Named stars" and "Bright stars".
A few examples (click on the images for full size):
(https://dl.dropboxusercontent.com/u/71653208/FotosForum/Orion.jpg) (https://dl.dropboxusercontent.com/u/71653208/FotosForum/Orion.jpg)
(https://dl.dropboxusercontent.com/u/71653208/FotosForum/Ursas.jpg) (https://dl.dropboxusercontent.com/u/71653208/FotosForum/Ursas.jpg)
(https://dl.dropboxusercontent.com/u/71653208/FotosForum/Crux.jpg) (https://dl.dropboxusercontent.com/u/71653208/FotosForum/Crux.jpg)
-
That is simply fantastic!
-
:D
This script was already invaluable for my astronomy classes. Now, even more so! Thank you.
-
I have just finished a new version of AnnotateImage. This version has two new layers:
- Constellation lines: The layer draws on the image the asterisms of the constellations.
- Constellation borders: The layer draws on the image the borders between constellations.
Will Juan distribute it via the update mechanism?
Georg
-
Will Juan distribute it via the update mechanism?
Sure thing. Can I proceed with the zip file you have posted here, Andrés?
-
Will Juan distribute it via the update mechanism?
Sure thing. Can I proceed with the zip file you have posted here, Andrés?
Ok.
-
The zip file above gave me when I tried it:
Files/PixInsight/src/scripts/ImageSolver+AnnotateImage/ImageSolver.js, line 131: include file not found: pjsr/SectionBar.jsh
I still use v1.7 (1.07.06...). Is that the problem?
Thanks,
-Jeff
-
The zip file above gave me when I tried it:
Files/PixInsight/src/scripts/ImageSolver+AnnotateImage/ImageSolver.js, line 131: include file not found: pjsr/SectionBar.jsh
I still use v1.7 (1.07.06...). Is that the problem?
Thanks,
-Jeff
My scripts require v1.8RC7.
-
Thought so. Put back my old one and it worked fine.
-Jeff
-
I think that v1.8RC7 is at least as stable than v1.7 and much faster. After the (many) problems of previous release candidates it seems that Juan has nailed this version.
-
Thanks, Andres-
Maybe it's time for me to upgrade. I was intimidated by all the crash reports and waiting for the full release.
-Jeff
-
Thanks, Jeff and Andres,
I was thinking the same thing as Jeff. I've been waiting on a new focuser, and so I haven't been out collecting data for a few months. Didn't have a lot of old data to play with, either, so I've been on a bit of an imaging hiatus. I've kept reading the PI forum, though, and have been holding off on installing 1.8, for the same reasons Jeff mentioned. Hearing someone say that the current 1.8 seems to be as stable as 1.7... that's reassuring to me.
I should install 1.8 soon, once my main computer comes back from having its HDD replaced.
Thanks,
Marek
-
Upgraded & works fine.
Thanks,
-Jeff
-
Andres-
Could I make a small suggestion for the annotation script? I would love to see an option that prevents drawing circles larger than, say, 1/4 of the image size, so that images focusing on a single target aren't impacted by the large circles. I give the example of my application to m101:
http://www.flickr.com/photos/9906726@N08/8802974575/lightbox/
where the modification I am suggesting would let the user choose something like this:
http://www.flickr.com/photos/9906726@N08/8750894463/lightbox/
which is less obtrusive on the main object in the image. The circles are great for picking out small objects but not so great for the dominant large ones.
Anyway, that's something you might consider that I think would be helpful.
Thanks for the great script(s).
-Jeff
-
I love this script. But I think I miss something. In post #215 you show an image with all kinds of catalogs. I have the latest version (1.7) here in pixinsight but it seems all these catalogs have disappeared? Am I doing something wrong?
Edit: already found it...
-
Latest version is 1.8, RC7
-
Hello There,
I made an Image of the SN Region near Sagitta and would like to plate solve and annotate it. I tried several things but in don't work. On astrometry.net it was no problem to solve. The images are only 15 seconds on a tripod.
Has anybody an idea.
Thanks
Greetings
Karsten
-
I made an Image of the SN Region near Sagitta and would like to plate solve and annotate it. I tried several things but in don't work. On astrometry.net it was no problem to solve. The images are only 15 seconds on a tripod.
You can try two things:
- If you have solved the image in NOVA.astrometry.net you can download from there the solved image in FITS format ("New FITS image"). This image should work with AnnotateImage.
Since the image seems to have a short focal length it probably has distortions in the corners. In this case you can try to optimize it with ImageSolver checking the "OnlyOptimize" parameter and selecting a polynomial degree of 4 or 5. - If you are able to recognize some stars in the image you can use ManualImageSolver for solving it. Please read the documentation for learning to use it.
In any case, without knowing more data about the image I can not help you more. I would need the approximate coordinates of the center, the pixel size and focal length or the resolution (in arcseconds/pixel). Also, if the image is public in NOVA, please send me the link.
-
I have been able to solve the image using ManualImageSolver:
Image Plate Solver script version 3.2
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
-0.00626823 +0.0134593 -4.03757
-0.0134909 -0.00624971 +26.4892
+0 +0 +1
Projection origin.. [1500.006121 998.998218]pix -> [RA:+20 03 31.34 Dec:+24 36 55.13]
Polynomial degree.. 5
Resolution ........ 53.488 arcsec/pix
Rotation .......... -65.015 deg
Focal ............. 21.60 mm
Pixel size ........ 5.60 um
Field of view ..... 44d 34' 23.8" x 29d 41' 8.9"
Image center ...... RA: 20 03 31.337 Dec: +24 36 55.15
Image bounds:
top-left ....... RA: 19 40 27.422 Dec: +49 32 53.33
top-right ...... RA: 18 36 35.229 Dec: +10 01 10.60
bottom-left .... RA: 21 50 03.794 Dec: +35 23 04.41
bottom-right ... RA: 20 18 23.503 Dec: -00 26 57.48
===============================================================================
Attached to this message there is a .xpsm icon with the FITS header of the solution. You can apply this icon to your image. I have also attached a distortion map of your camera.
-
Hello Andres,
many thanks for doing it for me ;). I will study the manual solver script soon.
Here is my result.
https://www.dropbox.com/s/b6ugt2daait7pfr/.facebook_2121018002.jpg (https://www.dropbox.com/s/b6ugt2daait7pfr/.facebook_2121018002.jpg)
The image "new-image.fits" can't be opened in PI. Any idea why?
http://nova.astrometry.net/user_images/71103#annotated (http://nova.astrometry.net/user_images/71103#annotated)
Many thanks Andres
Karsten
-
The image "new-image.fits" can't be opened in PI. Any idea why?
http://nova.astrometry.net/user_images/71103#annotated (http://nova.astrometry.net/user_images/71103#annotated)
This is strange. I have downloaded several times images from nova.astrometry.net without problems.
In your case, the image "new-image.fits" seems to be wrong. It doesn't pass the test in the FITS Tester page:
http://fits.gsfc.nasa.gov/fits_verify.html (http://fits.gsfc.nasa.gov/fits_verify.html)
http://fits.gsfc.nasa.gov/cgi-bin/urlfitsverifier.pl?file=http%3A%2F%2Fnova.astrometry.net%2Fnew_fits_file%2F83494 (http://fits.gsfc.nasa.gov/cgi-bin/urlfitsverifier.pl?file=http%3A%2F%2Fnova.astrometry.net%2Fnew_fits_file%2F83494)
I think that you should report this problem to astrometry.net.
-
Hi Andres,
ok I will do that. maybe they have a solution.
-
Hi Anders,
I had a try with the manual solver and it worked very well. Thanks for the great Tutorial.
-
I have been using this script for some time and it has proven most useful for many situations & sparked great interest on the forum I frequent.... well done for developing it 8)
One enhancement I would request to make it complete would be an easy way of obtaining a list of the objects detected in the image - maybe in text format?
Thanks
Phil
-
Hi
Just to say this is a fantastic script :-*
Would be great if we could get more information on the identified objects i.e Mag etc
probably to much to ask , but I asked anyway ;D
Harry
-
Hi
Just to say this is a fantastic script :-*
Would be great if we could get more information on the identified objects i.e Mag etc
probably to much to ask , but I asked anyway ;D
Harry
You can do this using the script AnnotateImage. You can define up to 8 labels for each star with values extracted from the catalogs. Please, watch the attache image.
-
Hi
Well I should have looked harder :-[
Again many thanks
Harry
-
I use time to time annotate script and I find it quit neat. I have one request: is it possible to get on a output file (txt) with the list of the objects found? It would be great to use this list (or a partial one) to create the "tags" of the image analyzed to for search robots when the image is posted on a website..
Clear skies
Marco
-
This exactly what I mentioned a few posts earlier - no reply though :sad:
Phil
-
I use time to time annotate script and I find it quit neat. I have one request: is it possible to get on a output file (txt) with the list of the objects found? It would be great to use this list (or a partial one) to create the "tags" of the image analyzed to for search robots when the image is posted on a website..
Clear skies
Marco
It is an interesting idea but I don't know when I could implement it since I am currently quite busy.
-
Finally I have found some time for implementing this request: AnnotateImage has now an option for saving a text file with the objects of the catalogs inside the image.
It is important to take into account that the script doesn't "detect" the objects. It simply reads the objects from the catalogs and draws them where they should be. The objects can be too dim to be visible or the catalog can be wrong.
The text file has a block of lines for each active catalog. The first line of each catalog is the identifier of the catalog, the second is the description of the catalog. The next lines are a semicolon separated table. In this table the first line contains the headers of the columns and next there is a line for each object. The lines are ended with a simple carriage return so in Windows it will be necessary a text editor which can read this kind of files. You can use Notepad++, OpenOffice, WordPad or MSOffice (ie. Excel). You can use the function "Text to columns" in Excel for splitting the file in columns.
If the image has a file path, the text file will be saved using the same directory and filename but with the extension ".objects.txt". If the image has not a file path the script will ask for the path of the text file using the standard file dialog.
The code of the scripts is in the attached "AdP.7z" file.
-
That is excelent Andres, Thank you. :)
-
Hi,
Tried it out.... That is EXACTLY what I was after - superb 8) 8)
Thanks,
Phil
-
Great! I also tested it and works great :)
Thanks a lot for the very fast implementation (upon the fantastic script itself) :)
Clear skies
Marco
-
One thing that I'm even newer at than astrophotography as a hobby is PixInsight for post processing, but as I learn, I continue to run into absolute spellbinding wonderment. Today was one of those days... when I found your Image Solver and Annotation scripts. They were intuitive and easy for even a beginner such as myself to use and I'm simply amazed.
Thank you so very much for this tool.
Cheers,
Clayton
-
Thanks Clayton :) :)
-
Hello Andres Pozo
I'm helping a friend of mine to include other catalogs in the script like Lynd's and HH, but doesn't works, could you give us some help?
one question ... for some objects which cover large areas wider than the field of the image, the subject could be still annotated but can't see the borders neither the name because write it in the center isn't possible?
Many thanks, and my congrats for this useful script!
Elio
-
Hello Andres Pozo
I'm helping a friend of mine to include other catalogs in the script like Lynd's and HH, but doesn't works, could you give us some help?
one question ... for some objects which cover large areas wider than the field of the image, the subject could be still annotated but can't see the borders neither the name because write it in the center isn't possible?
Many thanks, and my congrats for this useful script!
Elio
Hi Elio.
I'm answering from a phone so I can not give a detailed answer. You can read the message #76 of this thread http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257).
If you still have doubts the next Monday I can try to solve them.
Andres.
-
Thanks Andres now it works fine :)
-
Hello!
Is it possible to add in script Abell Catalog?
http://www.fayloobmennik.net/4722237
-
Hello!
Is it possible to add in script Abell Catalog?
http://www.fayloobmennik.net/4722237
You can use a custom catalog. Please read http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257)
-
You can use a custom catalog. Please read http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257 (http://pixinsight.com/forum/index.php?topic=3966.msg28257#msg28257)
Wow, I'll be a few years of this text file to write :)
-
I have published a new beta version in this thread: http://pixinsight.com/forum/index.php?topic=8616.0 (http://pixinsight.com/forum/index.php?topic=8616.0)
-
This script is amazing.
Thank you for sharing.
Andrea
-
I have made a custom catalog for use with the Annotation script and it does not appear to work. i.e. no plots are made.
The catalog is of globular clusters in M31. Can someone try this out please.
The catalog is here:
http://www.mikeoates.org/tmp/beta_m31_globular_clusters.txt
This is based on data from:
http://www.astronomy-mall.com/Adventures.In.Deep.Space/gcm31.htm
Thanks,
Mike
-
I have made a custom catalog for use with the Annotation script and it does not appear to work. i.e. no plots are made.
The catalog is of globular clusters in M31. Can someone try this out please.
The catalog is here:
http://www.mikeoates.org/tmp/beta_m31_globular_clusters.txt
This is based on data from:
http://www.astronomy-mall.com/Adventures.In.Deep.Space/gcm31.htm
Thanks,
Mike
Your custom catalog seems to have the right ascension in hours not degrees. You can multiply it by 15 and test again.
Andrés
-
Andrés,
Opps :) silly me, thank you for pointing out my error, I knew it would be something I had done wrong.
Works a treat when corrected.
Thank you,
Mike
-
Thanks for the great Scripts!
With the AnnotateImage script, is it possible to rename custom catalogs? I have created two catalogs for LDN and LBN objects but can't distinguish between the two in the script.
Or is there another place to download ready-made catalogs for this script?
-
Hi Joel,
With the AnnotateImage script, is it possible to rename custom catalogs? I have created two catalogs for LDN and LBN objects but can't distinguish between the two in the script.
You are right. I have to think about this. Meanwhile you can distinguish between them clicking in one of them and looking to the file field.
Or is there another place to download ready-made catalogs for this script?
You can make these files using a spreadsheet or downloading an online catalog. Please read this:
https://pixinsight.com/forum/index.php?topic=9941.0 (https://pixinsight.com/forum/index.php?topic=9941.0)
-
I've used the script in the past with no problems, but, now I have an issue. When I run the script the annotated image is produced, but, all the text is mirrored around the horizontal axis. Some processing details: I attempted to plate solve with ImageSolver, but, it fails. I took the same image and plate solved with TheSkyX with no issue. I then re-opened in PixInsight. I've atgtached a jpeg of the annotated image and a screen shot shot showing the FITS header.
-
Hi Gordon.
It is very probable that the problem is with the coordinate origin of the FITS file. Please check if the problem is fixed changing the value in "Format explorer | FITS | Edit Preferences | Coordinate origin" to bottom-up or up-bottom.
In any case, ImageSolver should be able to solve this image. What was the problem?
Have you tried to solve it with ImageSolver after solving with the other application? If ImageSolver solves it now, probably the problem was the starting parameters (coordinates and resolution) of the image. If it still doesn't solve it, you can try to activate the noise reduction or changing the magnitude of the catalog.
Also, remember that if the image is mirrored you must select Triangles in "Advanced Parameters | Alignment algoritm".
Andrés.
-
Changing the FITS to "bottom-up" solved the problem. I had to go back to my original "RAW" images to make it work. It also fixed the plate solve. Interestingly, re-orienting the XISF files to match that of the bottom-up FITS still will not solve.
Thanks for your help.
Gordon