Author Topic: Annotation script  (Read 151820 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Annotation script
« Reply #60 on: 2012 March 20 09:28:30 »
seems to look the same...

ugh.


Code: [Select]
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
-----------------------


Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: Annotation script
« Reply #61 on: 2012 March 21 12:15:15 »
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




Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Annotation script
« Reply #62 on: 2012 March 21 12:45:15 »
Got this error when running it after the Calibrate script. Reset of Javascript Runtime resolved problem:
Code: [Select]
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
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #63 on: 2012 March 21 12:49:14 »
Got this error when running it after the Calibrate script. Reset of Javascript Runtime resolved problem:
Code: [Select]
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.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #64 on: 2012 March 23 06:47:09 »
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.
« Last Edit: 2012 April 02 05:13:05 by Andres.Pozo »

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Annotation script
« Reply #65 on: 2012 March 23 07:03:53 »
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.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #66 on: 2012 March 23 07:13:28 »
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.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Annotation script
« Reply #67 on: 2012 March 23 07:49:53 »
is anyone else using pixinsight on osx (x86-64) and has this working? still does not work for me.

Offline Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 274
  • Resistance is futile.
    • Astronomí­a Sur
Re: Annotation script
« Reply #68 on: 2012 March 23 09:02:13 »
Amazing work Andres, thanks!! :D

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Annotation script
« Reply #69 on: 2012 March 23 12:20:15 »
Hi

Thanks for your hard work

Harry

Harry Page

Offline Fco. Bosch

  • Member
  • *
  • Posts: 66
Re: Annotation script
« Reply #70 on: 2012 March 23 14:42:13 »
Hi Andrés; I have tried today your scripts and I they are wonderful; they add an important functionality for us. Thanks you!

Francisco
Fco. Bosch

Offline Jose Joaquin Perez

  • Newcomer
  • Posts: 41
    • Astrofotografía Austral
Re: Annotation script
« Reply #71 on: 2012 March 25 10:17:02 »
Andrés, congratulations on a great work very useful for all of us.
Un gran abrazo,
____________________
José Joaquín Pérez
Rancagua, Chile
www.astro-austral.cl

Offline Grinde

  • Newcomer
  • Posts: 1
Re: Annotation script
« Reply #72 on: 2012 March 27 01:48:44 »
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

Offline perfrej

  • Newcomer
  • Posts: 1
Re: Annotation script
« Reply #73 on: 2012 March 31 06:50:48 »
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 *>

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Annotation script
« Reply #74 on: 2012 March 31 07:16:26 »
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.