File | /wise/base/static/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Astro/WCS/LibWCS.pm | Statements Executed | 24 | Total Time | 0.000948 seconds |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine | |
---|---|---|---|---|---|---|
12472 | 1 | 2 | 0.39999 | 0.39999 | Astro::WCS::LibWCS:: | wcskinit (xsub) |
2 | 1 | 2 | 0.00123 | 0.00123 | Astro::WCS::LibWCS:: | bootstrap (xsub) |
0 | 0 | 0 | 0 | 0 | Astro::WCS::LibWCS:: | AUTOLOAD |
0 | 0 | 0 | 0 | 0 | Astro::WCS::LibWCS:: | BEGIN |
0 | 0 | 0 | 0 | 0 | Astro::WCS::LibWCS:: | __ANON__[:455] |
Line | Stmts. | Exclusive Time | Avg. | Code |
---|---|---|---|---|
1 | package Astro::WCS::LibWCS; | |||
2 | ||||
3 | 1 | 1.0e-6 | 1.0e-6 | $VERSION = '0.91'; |
4 | ||||
5 | 3 | 3.0e-5 | 1.0e-5 | use strict; # spent 11µs making 1 call to strict::import |
6 | 3 | 3.5e-5 | 1.2e-5 | use Carp; # spent 58µs making 1 call to Exporter::import |
7 | 3 | 0.00049 | 0.00016 | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); # spent 106µs making 1 call to vars::import |
8 | ||||
9 | 1 | 0 | 0 | require Exporter; |
10 | 1 | 1.0e-6 | 1.0e-6 | require DynaLoader; |
11 | 1 | 1.0e-6 | 1.0e-6 | require AutoLoader; |
12 | ||||
13 | 1 | 1.2e-5 | 1.2e-5 | @ISA = qw(Exporter DynaLoader); |
14 | ||||
15 | 1 | 1.0e-5 | 1.0e-5 | my @_constants = qw( |
16 | PI | |||
17 | TNX_CHEBYSHEV | |||
18 | TNX_LEGENDRE | |||
19 | TNX_POLYNOMIAL | |||
20 | TNX_XFULL | |||
21 | TNX_XHALF | |||
22 | TNX_XNONE | |||
23 | WCS_AIR | |||
24 | WCS_AIT | |||
25 | WCS_ALTAZ | |||
26 | WCS_ARC | |||
27 | WCS_AZP | |||
28 | WCS_B1950 | |||
29 | WCS_BON | |||
30 | WCS_CAR | |||
31 | WCS_CEA | |||
32 | WCS_COD | |||
33 | WCS_COE | |||
34 | WCS_COO | |||
35 | WCS_CPS | |||
36 | WCS_CSC | |||
37 | WCS_CYP | |||
38 | WCS_DSS | |||
39 | WCS_ECLIPTIC | |||
40 | WCS_GALACTIC | |||
41 | WCS_GLS | |||
42 | WCS_J2000 | |||
43 | WCS_LIN | |||
44 | WCS_LINEAR | |||
45 | WCS_MER | |||
46 | WCS_MOL | |||
47 | WCS_NCP | |||
48 | WCS_NPOLE | |||
49 | WCS_PAR | |||
50 | WCS_PCO | |||
51 | WCS_PIX | |||
52 | WCS_PLANET | |||
53 | WCS_PLT | |||
54 | WCS_QSC | |||
55 | WCS_SIN | |||
56 | WCS_SPA | |||
57 | WCS_STG | |||
58 | WCS_TAN | |||
59 | WCS_TNX | |||
60 | WCS_TSC | |||
61 | WCS_ZEA | |||
62 | WCS_ZPN | |||
63 | ); | |||
64 | ||||
65 | 1 | 8.6e-5 | 8.6e-5 | my @_functions = qw( |
66 | wcsninit | |||
67 | wcsinit | |||
68 | wcsninitn | |||
69 | wcsinitn | |||
70 | wcsninitc | |||
71 | wcsinitc | |||
72 | wcsfree | |||
73 | wcsxinit | |||
74 | wcskinit | |||
75 | wcstype | |||
76 | wcsreset | |||
77 | wcseqset | |||
78 | wcscdset | |||
79 | wcsdeltset | |||
80 | wcspcset | |||
81 | wcsrotset | |||
82 | iswcs | |||
83 | nowcs | |||
84 | wcsshift | |||
85 | wcscent | |||
86 | wcssize | |||
87 | wcsfull | |||
88 | wcsrange | |||
89 | wcsdist | |||
90 | wcscominit | |||
91 | wcscom | |||
92 | wcsoutinit | |||
93 | getwcsout | |||
94 | wcsininit | |||
95 | getwcsin | |||
96 | setwcsdeg | |||
97 | wcsndec | |||
98 | getradecsys | |||
99 | setwcslin | |||
100 | pix2wcst | |||
101 | pix2wcs | |||
102 | wcs2pix | |||
103 | wcsc2pix | |||
104 | wcspos | |||
105 | wcspix | |||
106 | wcszin | |||
107 | wcszout | |||
108 | setwcsfile | |||
109 | setwcserr | |||
110 | wcserr | |||
111 | setdefwcs | |||
112 | getdefwcs | |||
113 | savewcscoor | |||
114 | getwcscoor | |||
115 | savewcscom | |||
116 | setwcscom | |||
117 | getwcscom | |||
118 | freewcscom | |||
119 | wcscon | |||
120 | wcsconp | |||
121 | wcsconv | |||
122 | wcscsys | |||
123 | wcsceq | |||
124 | wcscstr | |||
125 | fk524 | |||
126 | fk524e | |||
127 | fk524m | |||
128 | fk524pv | |||
129 | fk425 | |||
130 | fk425e | |||
131 | fk425m | |||
132 | fk425pv | |||
133 | fk42gal | |||
134 | gal2fk4 | |||
135 | fk52gal | |||
136 | gal2fk5 | |||
137 | eqstrn | |||
138 | v2s3 | |||
139 | s2v3 | |||
140 | fk42ecl | |||
141 | fk52ecl | |||
142 | ecl2fk4 | |||
143 | ecl2fk5 | |||
144 | fk4prec | |||
145 | fk5prec | |||
146 | mprecfk4 | |||
147 | mprecfk5 | |||
148 | hlength | |||
149 | gethlength | |||
150 | hgeti4 | |||
151 | hgeti2 | |||
152 | hgetr4 | |||
153 | hgetra | |||
154 | hgetdec | |||
155 | hgetr8c | |||
156 | hgetr8 | |||
157 | hgetl | |||
158 | hgetdate | |||
159 | hgetm | |||
160 | hgetsc | |||
161 | hgets | |||
162 | hgetndec | |||
163 | hgetc | |||
164 | blsearch | |||
165 | ksearch | |||
166 | str2ra | |||
167 | str2dec | |||
168 | strsrch | |||
169 | strnsrch | |||
170 | strcsrch | |||
171 | strncsrch | |||
172 | notnum | |||
173 | isnum | |||
174 | dsspos | |||
175 | dsspix | |||
176 | platepos | |||
177 | platepix | |||
178 | SetPlate | |||
179 | GetPlate | |||
180 | SetFITSPlate | |||
181 | tnxinit | |||
182 | tnxpos | |||
183 | tnxpix | |||
184 | tnxclose | |||
185 | tnxpset | |||
186 | worldpos | |||
187 | worldpix | |||
188 | hputi4 | |||
189 | hputr4 | |||
190 | hputr8 | |||
191 | hputnr8 | |||
192 | hputra | |||
193 | hputdec | |||
194 | hputl | |||
195 | hputs | |||
196 | hputm | |||
197 | hputc | |||
198 | hputcom | |||
199 | hdel | |||
200 | hadd | |||
201 | hchange | |||
202 | ra2str | |||
203 | dec2str | |||
204 | deg2str | |||
205 | num2str | |||
206 | actread | |||
207 | actrnum | |||
208 | actopen | |||
209 | actclose | |||
210 | tabread | |||
211 | tabrnum | |||
212 | tabxyread | |||
213 | tabrkey | |||
214 | tabcatopen | |||
215 | tabcatclose | |||
216 | tabstar | |||
217 | tabopen | |||
218 | tabclose | |||
219 | gettabline | |||
220 | tabgetk | |||
221 | tabgetc | |||
222 | tabparse | |||
223 | tabcol | |||
224 | istab | |||
225 | uacread | |||
226 | uacrnum | |||
227 | ujcread | |||
228 | ujcrnum | |||
229 | RefCat | |||
230 | CatCode | |||
231 | CatID | |||
232 | CatNum | |||
233 | CatNumLen | |||
234 | CatNdec | |||
235 | CatMagName | |||
236 | CatMagNum | |||
237 | StrNdec | |||
238 | NumNdec | |||
239 | SearchLim | |||
240 | RefLim | |||
241 | RangeInit | |||
242 | isrange | |||
243 | rstart | |||
244 | rgetn | |||
245 | rgetr8 | |||
246 | rgeti4 | |||
247 | ||||
248 | dt2fd | |||
249 | dt2jd | |||
250 | dt2mjd | |||
251 | hjd2jd | |||
252 | jd2hjd | |||
253 | mhjd2mjd | |||
254 | mjd2mhjd | |||
255 | jd2dt | |||
256 | jd2i | |||
257 | jd2mjd | |||
258 | jd2ep | |||
259 | jd2epb | |||
260 | jd2epj | |||
261 | lt2dt | |||
262 | lt2fd | |||
263 | lt2tsi | |||
264 | lt2tsu | |||
265 | lt2ts | |||
266 | mjd2dt | |||
267 | mjd2i | |||
268 | mjd2doy | |||
269 | mjd2jd | |||
270 | mjd2ep | |||
271 | mjd2epb | |||
272 | mjd2epj | |||
273 | mjd2fd | |||
274 | mjd2ts | |||
275 | ep2fd | |||
276 | epb2fd | |||
277 | epj2fd | |||
278 | ep2ts | |||
279 | epb2ts | |||
280 | epj2ts | |||
281 | epb2ep | |||
282 | ep2epb | |||
283 | epj2ep | |||
284 | ep2epj | |||
285 | ep2i | |||
286 | epb2i | |||
287 | epj2i | |||
288 | ep2jd | |||
289 | epb2jd | |||
290 | epj2jd | |||
291 | ep2mjd | |||
292 | epb2mjd | |||
293 | epj2mjd | |||
294 | epb2epj | |||
295 | epj2epb | |||
296 | jd2fd | |||
297 | jd2ts | |||
298 | jd2tsi | |||
299 | jd2tsu | |||
300 | dt2doy | |||
301 | doy2dt | |||
302 | doy2ep | |||
303 | doy2epb | |||
304 | doy2epj | |||
305 | doy2fd | |||
306 | doy2jd | |||
307 | doy2mjd | |||
308 | doy2tsu | |||
309 | doy2tsi | |||
310 | doy2ts | |||
311 | fd2doy | |||
312 | jd2doy | |||
313 | ts2jd | |||
314 | ts2mjd | |||
315 | ts2ep | |||
316 | ts2epb | |||
317 | ts2epj | |||
318 | dt2ep | |||
319 | dt2epb | |||
320 | dt2epj | |||
321 | ep2dt | |||
322 | epb2dt | |||
323 | epj2dt | |||
324 | fd2jd | |||
325 | fd2mjd | |||
326 | fd2tsu | |||
327 | fd2tsi | |||
328 | fd2ts | |||
329 | fd2fd | |||
330 | fd2of | |||
331 | et2fd | |||
332 | fd2et | |||
333 | dt2et | |||
334 | edt2dt | |||
335 | jd2jed | |||
336 | jed2jd | |||
337 | ts2ets | |||
338 | ets2ts | |||
339 | utdt | |||
340 | fd2ofd | |||
341 | fd2oft | |||
342 | fd2dt | |||
343 | fd2ep | |||
344 | fd2epb | |||
345 | fd2epj | |||
346 | dt2tsu | |||
347 | dt2tsi | |||
348 | dt2ts | |||
349 | ts2dt | |||
350 | tsi2dt | |||
351 | tsi2fd | |||
352 | tsi2ts | |||
353 | tsu2fd | |||
354 | tsu2dt | |||
355 | tsu2ts | |||
356 | tsu2tsi | |||
357 | ts2fd | |||
358 | dt2i | |||
359 | fd2i | |||
360 | ts2i | |||
361 | ut2doy | |||
362 | ut2dt | |||
363 | ut2ep | |||
364 | ut2epb | |||
365 | ut2epj | |||
366 | ut2fd | |||
367 | ut2jd | |||
368 | ut2mjd | |||
369 | ut2ts | |||
370 | ut2tsi | |||
371 | ut2tsu | |||
372 | fd2gst | |||
373 | dt2gst | |||
374 | ts2gst | |||
375 | fd2mst | |||
376 | dt2mst | |||
377 | ts2mst | |||
378 | compnut | |||
379 | isdate | |||
380 | ||||
381 | FindStars | |||
382 | setparm | |||
383 | SetWCSFITS | |||
384 | settolerance | |||
385 | setirafout | |||
386 | setmatch | |||
387 | ||||
388 | setreflim | |||
389 | setfitwcs | |||
390 | setfitplate | |||
391 | setminstars | |||
392 | setnofit | |||
393 | setfrac | |||
394 | setimfrac | |||
395 | setmaxcat | |||
396 | setiterate | |||
397 | setnfiterate | |||
398 | setiteratet | |||
399 | setrecenter | |||
400 | setsortmag | |||
401 | setmagfit | |||
402 | StarMatch | |||
403 | ParamFit | |||
404 | NParamFit | |||
405 | ReadMatch | |||
406 | WCSMatch | |||
407 | FitMatch | |||
408 | setresid_refine | |||
409 | getresid_refine | |||
410 | setnfit | |||
411 | getnfit | |||
412 | iscdfit | |||
413 | setminmatch | |||
414 | setminbin | |||
415 | setnitmax | |||
416 | FluxSortStars | |||
417 | MagSortStars | |||
418 | RASortStars | |||
419 | XSortStars | |||
420 | fitsrhead | |||
421 | fitsropen | |||
422 | fitsrtopen | |||
423 | fitsrthead | |||
424 | ); | |||
425 | ||||
426 | 1 | 0 | 0 | @EXPORT = ( ); |
427 | 1 | 7.5e-5 | 7.5e-5 | @EXPORT_OK = ( |
428 | @_constants, | |||
429 | @_functions, | |||
430 | ); | |||
431 | 1 | 2.0e-6 | 2.0e-6 | %EXPORT_TAGS = ( |
432 | 'constants' => \@_constants, | |||
433 | 'functions' => \@_functions, | |||
434 | ); | |||
435 | ||||
436 | sub AUTOLOAD { | |||
437 | # This AUTOLOAD is used to 'autoload' constants from the constant() | |||
438 | # XS function. If a constant is not found then control is passed | |||
439 | # to the AUTOLOAD in AutoLoader. | |||
440 | ||||
441 | my $constname; | |||
442 | ($constname = $AUTOLOAD) =~ s/.*:://; | |||
443 | croak "& not defined" if $constname eq 'constant'; | |||
444 | my $val = constant($constname, @_ ? $_[0] : 0); | |||
445 | if ($! != 0) { | |||
446 | if ($! =~ /Invalid/) { | |||
447 | $AutoLoader::AUTOLOAD = $AUTOLOAD; | |||
448 | goto &AutoLoader::AUTOLOAD; | |||
449 | } | |||
450 | else { | |||
451 | croak "Your vendor has not defined Astro::WCS::LibWCS macro $constname"; | |||
452 | } | |||
453 | } | |||
454 | 3 | 0.00012 | 3.9e-5 | no strict 'refs'; # spent 26µs making 1 call to strict::unimport |
455 | *$AUTOLOAD = sub { $val }; | |||
456 | goto &$AUTOLOAD; | |||
457 | } | |||
458 | ||||
459 | 1 | 2.1e-5 | 2.1e-5 | bootstrap Astro::WCS::LibWCS $VERSION; # spent 3.89ms making 1 call to DynaLoader::bootstrap |
460 | ||||
461 | # Preloaded methods go here. | |||
462 | ||||
463 | # Autoload methods go after __END__, and are processed by the autosplit program. | |||
464 | ||||
465 | 1 | 6.2e-5 | 6.2e-5 | 1; |
466 | __END__ | |||
467 | ||||
468 | =head1 NAME | |||
469 | ||||
470 | Astro::WCS::LibWCS - Perl interface to WCSTools libwcs | |||
471 | ||||
472 | =head1 SYNOPSIS | |||
473 | ||||
474 | use Astro::WCS::LibWCS; # export nothing by default | |||
475 | use Astro::WCS::LibWCS qw( :functions ); # export function names | |||
476 | use Astro::WCS::LibWCS qw( :constants ); # export constant names | |||
477 | ||||
478 | =head1 DESCRIPTION | |||
479 | ||||
480 | This module is a Perl interface to the routines in the WCSTools libwcs | |||
481 | C library, by Doug Mink. WCSTools is a package of programs and a | |||
482 | library for using the World Coordinate System (WCS). See | |||
483 | http://tdc-www.harvard.edu/software/wcstools/ for more information on | |||
484 | WCSTools. | |||
485 | ||||
486 | =head1 Name-space issues | |||
487 | ||||
488 | By default nothing is exported into your name-space when you C<use> | |||
489 | this package. Instead, C<Astro::WCS::LibWCS> uses the C<Exporter> | |||
490 | module's support for name-space tags. The available tags are | |||
491 | C<:functions> and C<:constants>. | |||
492 | ||||
493 | =head1 Deviations from libwcs | |||
494 | ||||
495 | C<pix2wcst()> does not require the final C<$lstr> argument. | |||
496 | ||||
497 | C<hgetm()> and C<hgets()> limit the length of the returned string to | |||
498 | the C<$lstr> argument given. If C<$lstr> is less than or equal to | |||
499 | zero, a maximum length of 2880 characters is used. | |||
500 | ||||
501 | ||||
502 | =head1 Matrix Arguments | |||
503 | ||||
504 | A few libwcs functions require an array of doubles representing | |||
505 | matrices. These functions should be handed a Perl array reference | |||
506 | (multi-dimensional arrays are fine) with enough elements, once | |||
507 | completely unpacked, to satisfy the input demands of the function in | |||
508 | question. If one is using a module such as PDL, then direct passing of | |||
509 | the machine-formatted data is possible by using a scalar reference | |||
510 | which points to the information (e.g., $piddle->get_dataref). | |||
511 | ||||
512 | =head1 Quasi-Object-Oriented Interface | |||
513 | ||||
514 | C<Astro::WCS::LibWCS> provides, in addition to the normal libwcs | |||
515 | functions, an OO interface. One obtains an "object" by calling one of | |||
516 | C<wcsinit()>, C<wcsninit()>, C<wcsinitn()>, C<wcsninitn()>, | |||
517 | C<wcsinitc()>, C<wcsninitc()>, C<wcsxinit()> or C<wcskinit()>. The | |||
518 | actual object class is C<WCSPtr>. Any libwcs routines which expect the | |||
519 | first argument to be of type C<struct WorldCoor *> are blessed into | |||
520 | this class. As an added bonus, any of these routines which begin with | |||
521 | the string "wcs" can be called shorthand without the prefix. | |||
522 | ||||
523 | =head2 Library routines | |||
524 | ||||
525 | The following routines are blessed into the C<WCSPtr> class (along | |||
526 | with their shorthand names): | |||
527 | ||||
528 | =over 4 | |||
529 | ||||
530 | =item wcsfree( ), free( ) | |||
531 | ||||
532 | =item wcstype( ), type( ) | |||
533 | ||||
534 | =item wcsreset( ), reset( ) | |||
535 | ||||
536 | =item wcseqset( ), eqset( ) | |||
537 | ||||
538 | =item wcscdset( ), cdset( ) | |||
539 | ||||
540 | =item wcsdeltset( ), deltset( ) | |||
541 | ||||
542 | =item wcspcset( ), pcset( ) | |||
543 | ||||
544 | =item wcsrotset( ), rotset( ) | |||
545 | ||||
546 | =item iswcs( ) | |||
547 | ||||
548 | =item nowcs( ) | |||
549 | ||||
550 | =item wcsshift( ), shift( ) | |||
551 | ||||
552 | =item wcscent( ), cent( ) | |||
553 | ||||
554 | =item wcssize( ), size( ) | |||
555 | ||||
556 | =item wcsfull( ), full( ) | |||
557 | ||||
558 | =item wcsrange( ), range( ) | |||
559 | ||||
560 | =item wcscominit( ), cominit( ) | |||
561 | ||||
562 | =item wcscom( ), com( ) | |||
563 | ||||
564 | =item wcsoutinit( ), outinit( ) | |||
565 | ||||
566 | =item getwcsout( ) | |||
567 | ||||
568 | =item wcsininit( ), ininit( ) | |||
569 | ||||
570 | =item getwcsin( ) | |||
571 | ||||
572 | =item setwcsdeg( ) | |||
573 | ||||
574 | =item wcsndec( ), ndec( ) | |||
575 | ||||
576 | =item getradecsys( ) | |||
577 | ||||
578 | =item setwcslin( ) | |||
579 | ||||
580 | =item pix2wcst( ) | |||
581 | ||||
582 | =item pix2wcs( ) | |||
583 | ||||
584 | =item wcs2pix( ) | |||
585 | ||||
586 | =item wcsc2pix( ) | |||
587 | ||||
588 | =item wcszout( ), zout( ) | |||
589 | ||||
590 | =item setwcscom( ) | |||
591 | ||||
592 | =item freewcscom( ) | |||
593 | ||||
594 | =item SetPlate( ) | |||
595 | ||||
596 | =item GetPlate( ) | |||
597 | ||||
598 | =item tnxclose( ) | |||
599 | ||||
600 | =item tnxpset( ) | |||
601 | ||||
602 | =back | |||
603 | ||||
604 | =head2 Additional utility routines | |||
605 | ||||
606 | These are available to retrieve the members of the WCSPtr struct. | |||
607 | ||||
608 | =over 4 | |||
609 | ||||
610 | =item xref( ) | |||
611 | ||||
612 | =item yref( ) | |||
613 | ||||
614 | =item xrefpix( ) | |||
615 | ||||
616 | =item yrefpix( ) | |||
617 | ||||
618 | =item xinc( ) | |||
619 | ||||
620 | =item yinc( ) | |||
621 | ||||
622 | =back | |||
623 | ||||
624 | =head1 BUGS | |||
625 | ||||
626 | Likely many! Very little of the module has been tested. If you find | |||
627 | something that looks like a bug, please send a report. | |||
628 | ||||
629 | =head1 AUTHOR | |||
630 | ||||
631 | Pete Ratzlaff <pratzlaff@cfa.harvard.edu> | |||
632 | ||||
633 | Contributors include: | |||
634 | ||||
635 | =over 4 | |||
636 | ||||
637 | =item Diab Jerius <dj@head-cfa.harvard.edu> | |||
638 | ||||
639 | =back | |||
640 | ||||
641 | =head1 SEE ALSO | |||
642 | ||||
643 | perl(1). | |||
644 | ||||
645 | =cut | |||
# spent 1.23ms within Astro::WCS::LibWCS::bootstrap which was called
# once (1.23ms+0) by DynaLoader::bootstrap at line 226 of /opt/wise/lib/perl5/5.10.0/x86_64-linux-thread-multi/DynaLoader.pm | ||||
# spent 400ms within Astro::WCS::LibWCS::wcskinit which was called 12471 times, avg 32µs/call:
# 12471 times (400ms+0) by WISE::WCS::new at line 72 of /wise/base/deliv/dev/lib/perl/WISE/FITSIO/Utils.pm, avg 32µs/call |