Module: Wcs

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

Defined Under Namespace

Classes: WorldCoor

Constant Summary collapse

VERSION =
"0.1.2"

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



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

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])


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

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])


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

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

.getdefwcsInteger

Return flag for AIPS WCS set by setdefwcs

Returns:

  • (Integer)


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

def getdefwcs
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



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

def s2v3(ra,dec,r)
  # 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)


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

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)


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

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)


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

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



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

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



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

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



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

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, GALACTIC)

  • 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



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

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



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

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, 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

  • 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



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

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



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

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)


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

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)


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

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)


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

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

.wcserrnil

Print WCS error message to stderr

Returns:

  • (nil)


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

def wcserr
end

.wcszin(izpix) ⇒ Integer

Set third dimension for cube projections

Parameters:

  • izpix (Integer)

    Set coordinate in third dimension (face)

Returns:

  • (Integer)

    saved izpix



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

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