Guide Star Lister -- Java Edition - PowerPoint PPT Presentation

About This Presentation
Title:

Guide Star Lister -- Java Edition

Description:

Guide Star Lister -- Java Edition M.Lampton UCB SSL 15 March 2003 Guide Star Lister Determine s/c orientation Given a target (RA,dec) on the sky Given a target ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 13
Provided by: MikeLa79
Category:

less

Transcript and Presenter's Notes

Title: Guide Star Lister -- Java Edition


1
Guide Star Lister -- Java Edition
  • M.Lampton
  • UCB SSL
  • 15 March 2003

2
Guide Star Lister
  • Determine s/c orientation
  • Given a target (RA,dec) on the sky
  • Given a target location (x,y) on the focal plane
  • Given DoY hence sun location on sky..
  • what s/c orientation (pitch,yaw,roll)?
  • Find list all guide stars for that orientation
  • use GSC2.2 catalog subset for RA, dec, mag
  • use nominal guider chip locations on focal plane
  • Do it all in Java.

3
Focal Plane Coordinates
Spectrometer feed (0.1,0.1) meters
Telescope axis (0.0, 0.0) meters
4
GSC2.2http//www-gsss.stsci.edu/gsc/gsc2/GSC2home
.htm
  • Digitized photographic survey
  • Palomar Schmidt UK Schmidt all sky
  • Has 456 million entries
  • Released July 2001
  • Goes to about 18.5 in F or 19.5 in J
  • 23 fields and 208 bytes per object
  • Subsets can be downloaded from STScI

5
GuideStarLister Overview
  • General purpose methods
  • 6 static general purpose math methods
  • 6 static general purpose timekeeping/astronomy
    methods
  • 11 static general purpose vector matrix methods
  • Mission specific methods
  • telescope( ) converts star_sc into star_fp
  • epocselet( ) converts star_fp into star_sc
  • whichchip( ) converts star_fp into ichip,
    pixrow, pixcol
  • 5 solver support functions
  • given target RA,dec coordinates solar
    constraints
  • solve for attitude vector and unitary matrix
  • GSC parser analyzes Guide Star Cat 2.2 data
  • Took a Java novice (me) five weekends to write
  • 670 lines.
  • approx 10 is comments

6
public static void main(String args) throws
Exception double umat new
double33 System.out.println("..determ
ining attitude.....")
epocselet(TARGET_FPX, TARGET_FPY, tgt_sc) //
get tgt_sc setup(TARGET_DOY)
// get approx ori
solve() //
get exact ori get3x3mat(ori, umat)
// get umat
showattitude()
System.out.println("...RA.......dec.....Rmag.
...chip...row...col") int chipvec
new int3 int nrec0, ngood0
File myfile new File("gs.dat") if
(myfile.exists() myfile.canRead()) // LJ
p.308 try
FileReader fr new FileReader(myfile)
BufferedReader br new BufferedReader(fr)
String record ""
while ((record br.readLine()) ! null)
nrec
if (isguidestar(umat, record, chipvec))
ngood
showstar(record, chipvec)

System.out.println("Records"nrec"
good"ngood) catch
(FileNotFoundException e)
System.out.println("file is not available")

main( )
7
static boolean telescope(double star_sc,
double fp) // Converts star_sc vector to
focal plane coords, meters. // Returns true
if all is OK, otherwise returns false. // For
differentiability this model responds to a full
circular field // but actual telescope is
useful only over annulus 0.006ltslt0.013 //
M.Lampton UCB SSL Feb 2003 double x
star_sc0 double y star_sc1
double z star_sc2 double err
Math.abs(xx yy zz - 1.0) double s
Math.sqrt(xx yy) //
ssin(OffAxisAngle) if ((sgt0.0145)
(zlt0.99) (errgtTOL))
fp00.0 fp10.0
return false // outside circular field or norm
error // Coefs fit to TMA63
distortion 0.006ltslt0.013 // M.Lampton
SPIE 4849 p.215 2002 // The RMS fit error
is 1 microns RMS double a121.442388
double a32154.5181 double
a5216569.56 double radius a1s
a3sss a5sssss double azim
Math.atan2(y, x) fp0 radius
Math.cos(azim) fp1 radius
Math.sin(azim) return true
telescope( )
8
static boolean epocselet(double fpx, double
fpy, double star) // Inverse telescope
given (fpx,fpy) on focal plane, // computes
the direction to the star in SC coordinates.
// Returns 1 if OK otherwise zero. // For
differentiability, this routine allows full disk
rlt0.3 meters // but actual telescope will
image only over annulus 0.129ltrlt0.285. //
M.Lampton UCB SSL Feb 2003 double
FL 22.0 double fpr Math.sqrt(fpxfpx
fpyfpy) if (fprgt0.3) return
false star0 star1 0.0
// initially zero double trial
0.0, 0.0, 1.0 // trial values int
i for (int n0 nlt10 n)
star0 (fpx - trial0)/FL
star1 (fpy - trial1)/FL
star2 Math.sqrt(1.0 - SQR(star0) -
SQR(star1)) if (!telescope(star,
trial)) return false
return true
epocselet( )
9
static boolean whichchip(double fpxy, int
ipix) // Given a focal plane fpxy in
meters, // computes which chip and which
pixel gets the photon. // Returns true if
some chip succeeds, else false. // NOTE
ipix0chipid, ipix1col, ipix2row. //
Ultrasimplified! really there are various tilts
etc. // M.Lampton UCB SSL Feb 2003
int npix 3238 // pixels on each
axis double h 0.017 // half
size of chip, meters double c
0.150000, 0.150000, // xy center of
chip zero 0.150000, -0.150000, //
xy center of chip one -0.150000,
-0.150000, // xy center of chip two
-0.150000, 0.150000 // xy center of chip
three double x fpxy0 double
y fpxy1 ipix0 ipix1 ipix2
0 for (int i0 ilt4 i)
if (((x-ci0-h)(x-ci0h)lt0)
((y-ci1-h)(y-ci1h)lt0))
ipix0 i //
chipid 0,1,2,3 ipix1 (int)
(npix ((x-ci0h))/(2h))
ipix2 (int) (npix ((y-ci1h))/(2h))
return true
return false
whichchip( )
10
static void parseGSCrecord(String record,
double star) // Parses GSC record into
star RA, dec, mag // M.Lampton UCB SSL
Oct 2002, Feb 2003 String NAMEstr
"" String RAstr "" String
DECstr "" String Fstr ""
String classif "" star0 star1
star2 0.0 if (record.length() lt 1)
return StringTokenizer st new
StringTokenizer(record) // LJ p.228 int
nfield 0 while (st.hasMoreTokens( ))
String token st.nextToken()
switch (nfield)
case 0 NAMEstr token break case
1 RAstr token break case 2
DECstr token break case 10 Fstr
token break case 21 classif
token break default break
nfield if
(nfield lt 23) return star0
Double.parseDouble(RAstr) // LJ p.230
star1 Double.parseDouble(DECstr) // LJ
p.230 star2 Double.parseDouble(Fstr)
// LJ p.230
parseGSCrecord( )
11
isguidestar( )
static boolean isguidestar(double u, String
line, int chipvec) // tests a GSC record
and sees if it is a guide star
double radecmag new double3 // ra,
dec, mag double star_eq new
double3 // xyz unitsphere double
star_sc new double3 // xyz
unitsphere double star_fp new
double2 // fpxy coords
parseGSCrecord(line, radecmag)
geteqvec(radecmag0, radecmag1, star_eq)
mult(u, star_eq, star_sc) if
(telescope(star_sc, star_fp) 1) if
(whichchip(star_fp, chipvec)
(radecmag2ltDIMMESTMAG)) return
true return false
12
..determining attitude..... INPUT DoY0.0
target fpxy 0.1000 0.1000 OUTPUT yaw pitch
roll 31.8254 345.2915 247.7508 ...RA.......de
c.....Rmag....chip...row...col 242.8606 54.8418
15.2400 0001 2572 1897 242.8629 54.8482
14.7400 0001 2339 1950 242.8747 54.8632
15.9500 0001 1794 2207 242.8146 55.6465
14.0700 0002 2169 1253 242.8695 55.6612
15.2500 0002 1657 2378 242.8361 55.6999
15.4500 0002 0237 1695 244.1969 55.6183
11.7900 0003 3217 0740 244.2170 55.6447
15.7500 0003 2252 1150 244.2039 55.6532
15.3400 0003 1948 0882 244.1671 55.6823
12.9700 0003 0904 0129 244.2454 55.6887
15.1800 0003 0642 1732 242.8812 55.6238
15.0100 0002 3019 2615 242.8919 54.8704
12.3800 0001 1532 2571 242.8764 54.9060
15.1000 0001 0242 2272 242.8857 54.9019
14.0800 0001 0391 2462 244.1633 54.9063
14.8700 0000 0230 0287 244.1590 54.8399
15.5800 0000 2642 0238 244.2374 54.8311
14.1300 0000 2964 1885 244.1969 54.8939
15.1400 0000 0678 0994 244.1584 54.8606
14.3700 0000 1890 0212 244.2685 54.8979
13.5600 0000 0533 2487 Records15517 good21
Typical Output
Write a Comment
User Comments (0)
About PowerShow.com