Guest User

Untitled

a guest
Nov 15th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. ; intended to work for WISE L1b headers, not sure if there are other different
  2. ; or more general types of SIP WCS that come from different data sets
  3. ; and/or telescopes
  4.  
  5. ;IDL> help,astr.distort
  6. ;** Structure <78c348>, 5 tags, length=416, data length=416, refs=2:
  7. ; NAME STRING 'SIP'
  8. ; A FLOAT Array[5, 5]
  9. ; B FLOAT Array[5, 5]
  10. ; AP FLOAT Array[5, 5]
  11. ; BP FLOAT Array[5, 5]
  12.  
  13.  
  14. function flatten_sip, astr
  15.  
  16. ; to save space, DON'T include distort.name -- will assume it's always SIP
  17.  
  18. distort = astr.distort
  19. addstr = {a: distort.a, b: distort.b, ap: distort.ap, bp: distort.bp}
  20.  
  21. astr_flat = struct_trimtags(astr, except=['DISTORT'])
  22.  
  23. astr_flat = struct_addtags(astr_flat, addstr)
  24.  
  25. return, astr_flat
  26. end
  27.  
  28.  
  29. ; should test on small number of images from each of W1 and W2, and from
  30. ; each mission phase, to make sure nothing about the WISE SIP format
  31. ; changed over time
  32.  
  33. pro test_flatten_sip
  34.  
  35. fname = '/project/projectdirs/cosmo/data/wise/allsky/4band_p1bm_frm/0a/03590a/143/03590a143-w1-int-1b.fits'
  36.  
  37. h = headfits(fname)
  38. extast, h, astr
  39.  
  40. end
  41.  
  42. ; see if anything about the WISE/NEOWISE SIP scheme has changed for
  43. ; more recent data
  44. pro test_neo4
  45.  
  46. fname = '/project/projectdirs/cosmo/staging/wise/neowiser4/neowiser/p1bm_frm/3b/79673b/072/79673b072-w2-int-1b.fits'
  47.  
  48. h = headfits(fname)
  49. extast, h, astr
  50.  
  51. end
Add Comment
Please, Sign In to add comment