Module: Wcs

Defined in:
lib/wcs/libdoc.rb,
lib/wcs/version.rb

Defined Under Namespace

Classes: WorldCoor

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.d2v3(ra, dec, r) ⇒ [x,y,z]

Convert RA and Dec in degrees and distance to vector

Parameters:

  • ra (Float)

    Right ascension in degrees

  • dec (Float)

    Declination in degrees

  • r (Float)

    Distance to object in same units as pos

Returns:

  • ([x,y,z])

    x,y,z geocentric equatorial position of object



448
449
450
# File 'lib/wcs/libdoc.rb', line 448

def d2v3(ra,dec,r)
  # This function is defined in C
end

.fk425e(ra, dec, epoch) ⇒ [ra,dec]

Convert B1950(FK4) to J2000(FK5) coordinates

Parameters:

  • ra (Float)

    Right ascension in degrees (B1950 in, J2000 out)

  • dec (Float)

    Declination in degrees (B1950 in, J2000 out)

  • epoch (Float)

    Besselian epoch in years

Returns:

  • ([ra,dec])


402
403
404
# File 'lib/wcs/libdoc.rb', line 402

def fk425e(ra,dec,epoch)
  # This function is defined in C
end

.fk524e(ra, dec, epoch) ⇒ [ra,dec]

Convert J2000(FK5) to B1950(FK4) coordinates

Parameters:

  • ra (Float)

    Right ascension in degrees (J2000 in, B1950 out)

  • dec (Float)

    Declination in degrees (J2000 in, B1950 out)

  • epoch (Float)

    Besselian epoch in years

Returns:

  • ([ra,dec])


412
413
414
# File 'lib/wcs/libdoc.rb', line 412

def fk524e(ra,dec,epoch)
  # This function is defined in C
end

.getdefwcsInteger

Return flag for AIPS WCS set by setdefwcs

Returns:

  • (Integer)


300
301
# File 'lib/wcs/libdoc.rb', line 300

def getdefwcs
end

.getwcscoorString

Return output coordinate system

Returns:

  • (String)


330
331
# File 'lib/wcs/libdoc.rb', line 330

def getwcscoor
end

.s2v3(ra, dec, r) ⇒ [x,y,z]

Convert RA and Dec in radians and distance to vector

Parameters:

  • ra (Float)

    Right ascension in radians

  • dec (Float)

    Declination in radians

  • r (Float)

    Distance to object in same units as pos

Returns:

  • ([x,y,z])

    x,y,z geocentric equatorial position of object



458
459
460
# File 'lib/wcs/libdoc.rb', line 458

def s2v3(ra,dec,r)
  # This function is defined in C
end

.savewcscoor(wcscoor) ⇒ nil

Save output coordinate system

Parameters:

  • wcscoor (String)

    coordinate system (J2000, B1950, galactic)

Returns:

  • (nil)


324
325
326
# File 'lib/wcs/libdoc.rb', line 324

def savewcscoor(wcscoor)
  # This function is defined in C
end

.setdefwcs(oldwcs) ⇒ nil

Set flag to use AIPS WCS instead of WCSLIB

Parameters:

  • oldwcs (Integer)

    1 for AIPS WCS subroutines, else WCSLIB

Returns:

  • (nil)


294
295
296
# File 'lib/wcs/libdoc.rb', line 294

def setdefwcs(oldwcs)
  # This function is defined in C
end

.setwcserr(errmsg) ⇒ nil

Set WCS error message for later printing

Parameters:

  • errmsg (String)

    Error mesage < 80 char

Returns:

  • (nil)


281
282
283
# File 'lib/wcs/libdoc.rb', line 281

def setwcserr(errmsg)
  # This function is defined in C
end

.setwcsfile(filename) ⇒ nil

Set filename for WCS error message

Parameters:

  • filename (String)

    FITS or IRAF file name

Returns:

  • (nil)


315
316
317
# File 'lib/wcs/libdoc.rb', line 315

def setwcsfile(filename)
  # This function is defined in C
end

.v2d3(pos) ⇒ [ra,dec,r]

Convert vector to RA and Dec in degrees and distance

Parameters:

  • pos (Array)

    x,y,z geocentric equatorial position of object

Returns:

  • ([ra,dec,r])
    • ra: Right ascension in degrees

    • dec: Declination in degrees

    • r: Distance to object in same units as pos



469
470
471
# File 'lib/wcs/libdoc.rb', line 469

def v2d3(pos)
  # This function is defined in C
end

.v2s3(pos) ⇒ [ra,dec,r]

Convert vector to RA and Dec in radians and distance

Parameters:

  • pos (Array)

    x,y,z geocentric equatorial position of object

Returns:

  • ([ra,dec,r])
    • ra: Right ascension in radians

    • dec: Declination in radians

    • r: Distance to object in same units as pos



480
481
482
# File 'lib/wcs/libdoc.rb', line 480

def v2s3(pos)
  # This function is defined in C
end

.wcsceq(wcstring_in) ⇒ Float

Set equinox from string

Parameters:

  • wcstring_in (String)

    Coordinate system (B1950, J2000, etc)

Returns:

  • (Float)

    return 0.0 if not obvious



428
429
430
# File 'lib/wcs/libdoc.rb', line 428

def wcsceq(wcstring_in)
  # This function is defined in C
end

.wcscon(sys1, sys2, eq1, eq2, dtheta, dphi, epoch) ⇒ [dtheta,dphi]

Convert between coordinate systems and equinoxes

Parameters:

  • sys1 (Integer)

    Input coordinate system (J2000, B1950, ECLIPTIC, GALACTIC

  • sys2 (Integer)

    Output coordinate system (J2000, B1950, ECLIPTIC, G ALACTIC

  • eq1 (Float)

    Input equinox (default of sys1 if 0.0)

  • eq2 (Float)

    Output equinox (default of sys2 if 0.0)

  • dtheta (Float)

    Longitude or right ascension in degrees

  • dphi (Float)

    Latitude or declination in degrees

  • epoch (Float)

    Besselian epoch in years

Returns:

  • ([dtheta,dphi])
    • dtheta: Longitude or right ascension in degrees

    • dphi: Latitude or declination in degrees



392
393
394
# File 'lib/wcs/libdoc.rb', line 392

def wcscon(sys1,sys2,eq1,eq2,dtheta,dphi,epoch)
  # This function is defined in C
end

.wcsconp(sys1, sys2, eq1, eq2, ep1, ep2, dtheta, dphi, ptheta, pphi) ⇒ [dtheta,dphi,ptheta,pphi]

Convert from coordinate system sys1 to coordinate system sys2, converting proper motions, too, and adding them if an epoch is specified

Parameters:

  • sys1 (Integer)

    Input coordinate system (J2000, B1950, ECLIPTIC, GALACTIC

  • sys2 (Integer)

    Output coordinate system (J2000, B1950, ECLIPTIC, GALACTIC

  • eq1 (Float)

    Input equinox (default of sys1 if 0.0)

  • eq2 (Float)

    Output equinox (default of sys2 if 0.0)

  • ep1 (Float)

    Input Besselian epoch in years (for proper motion)

  • ep2 (Float)

    Output Besselian epoch in years (for proper motion)

  • dtheta (Float)

    Longitude or right ascension in degrees

  • dphi (Float)

    Latitude or declination in degrees

  • ptheta (Float)

    Longitude or right ascension proper motion in RA degrees/yea

  • pphi (Float)

    Latitude or declination proper motion in Dec degrees/year

Returns:

  • ([dtheta,dphi,ptheta,pphi])
    • dtheta: Longitude or right ascension in degrees

    • dphi: Latitude or declination in degrees

    • ptheta: Longitude or right ascension proper motion in RA degrees/yea

    • pphi: Latitude or declination proper motion in Dec degrees/year



377
378
# File 'lib/wcs/libdoc.rb', line 377

def wcsconp(sys1,sys2,eq1,eq2,ep1,ep2,dtheta,dphi,ptheta,pphi);
end

.wcsconv(sys1, sys2, eq1, eq2, ep1, ep2, dtheta, dphi, ptheta, pphi, px, rv) ⇒ [dtheta,dphi,ptheta,pphi,px,rv]

Convert from coordinate system sys1 to coordinate system sys2, converting proper motions, too, and adding them if an epoch is specified

Parameters:

  • sys1 (Integer)

    Input coordinate system (J2000, B1950, ECLIPTIC, GALACTIC

  • sys2 (Integer)

    Output coordinate system (J2000, B1950, ECLIPTIC, G ALACTIC

  • eq1 (Float)

    Input equinox (default of sys1 if 0.0)

  • eq2 (Float)

    Output equinox (default of sys2 if 0.0)

  • ep1 (Float)

    Input Besselian epoch in years

  • ep2 (Float)

    Output Besselian epoch in years

  • dtheta (Float)

    Longitude or right ascension in degrees in sys1

  • dphi (Float)

    Latitude or declination in degrees in sys1

  • ptheta (Float)

    Longitude or right ascension proper motion in deg/year in sys1

  • pphi (Float)

    Latitude or declination proper motion in deg/year

  • px (Float)

    Parallax in arcseconds

  • rv (Float)

    Radial velocity in km/sec

Returns:

  • ([dtheta,dphi,ptheta,pphi,px,rv])
    • dtheta: Longitude or right ascension in degrees in sys1

    • dphi: Latitude or declination in degrees in sys1

    • ptheta: Longitude or right ascension proper motion in deg/year in sys1

    • pphi: Latitude or declination proper motion in deg/year

    • px: Parallax in arcseconds

    • rv: Radial velocity in km/sec



355
356
357
# File 'lib/wcs/libdoc.rb', line 355

def wcsconv(sys1,sys2,eq1,eq2,ep1,ep2,dtheta,dphi,ptheta,pphi,px,rv)
  # This function is defined in C
end

.wcscstr(cstr, syswcs, equinox, epoch) ⇒ String

Set coordinate system type string from system and equinox

Parameters:

  • syswcs (Integer)

    Coordinate system code

  • equinox (Float)

    Equinox of coordinate system

  • epoch (Float)

    Epoch of coordinate system

Returns:

  • (String)

    Coordinate system string



438
439
440
# File 'lib/wcs/libdoc.rb', line 438

def wcscstr(cstr,syswcs,equinox,epoch)
  # This function is defined in C
end

.wcscsys(coorsys) ⇒ Integer

Return code for coordinate system in string

Parameters:

  • coorsys (String)

    Coordinate system (B1950, J2000, etc)

Returns:

  • (Integer)


420
421
422
# File 'lib/wcs/libdoc.rb', line 420

def wcscsys(coorsys)
  # This function is defined in C
end

.wcsdiff(ra1, dec1, ra2, dec2) ⇒ Float

Compute angular distance between 2 sky positions

Parameters:

  • ra1 (Float)

    First longitude/right ascension in degrees

  • dec1 (Float)

    First latitude/declination in degrees

  • ra2 (Float)

    Second longitude/right ascension in degrees

  • dec2 (Float)

    Second latitude/declination in degrees

Returns:

  • (Float)


273
274
275
# File 'lib/wcs/libdoc.rb', line 273

def wcsdiff(ra1,dec1,ra2,dec2)
  # This function is defined in C
end

.wcsdist(ra1, dec1, ra2, dec2) ⇒ Float

Compute angular distance between 2 sky positions

Parameters:

  • ra1 (Float)

    First longitude/right ascension in degrees

  • dec1 (Float)

    First latitude/declination in degrees

  • ra2 (Float)

    Second longitude/right ascension in degrees

  • dec2 (Float)

    Second latitude/declination in degrees

Returns:

  • (Float)


262
263
264
# File 'lib/wcs/libdoc.rb', line 262

def wcsdist(ra1,dec1,ra2,dec2)
  # This function is defined in C
end

.wcserrnil

Print WCS error message to stderr

Returns:

  • (nil)


287
288
# File 'lib/wcs/libdoc.rb', line 287

def wcserr
end

.wcszin(izpix) ⇒ Integer

Set third dimension for cube projections

Parameters:

  • izpix (Integer)

    Set coordinate in third dimension (face)

Returns:

  • (Integer)


307
308
309
# File 'lib/wcs/libdoc.rb', line 307

def wcszin(izpix)
  # This function is defined in C
end