Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.04 KB | None | 0 0
  1. ipython --pylab
  2. Python 3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, 13:19:00)
  3. Type "copyright", "credits" or "license" for more information.
  4.  
  5. IPython 5.1.0 -- An enhanced Interactive Python.
  6. ? -> Introduction and overview of IPython's features.
  7. %quickref -> Quick reference.
  8. help -> Python's own help system.
  9. object? -> Details about 'object', use 'object??' for extra details.
  10. Using matplotlib backend: MacOSX
  11.  
  12. In [1]: import specutils
  13. INFO:root:Successfully loaded reader "cubetest1".
  14. INFO:root:Successfully loaded reader "tabular-fits".
  15. INFO:root:Successfully loaded reader "wcs1d-fits".
  16.  
  17. In [3]: s1d = specutils.wcs_fits_reader.wcs1d_fits('test_L1455IRS1_DCN2-1.fits')
  18. INFO:root:Spectrum file looks like wcs1d-fits
  19. WARNING: Header block contains null bytes instead of spaces for padding, and is not FITS-compliant. Nulls may be replaced with spaces upon writing. [astropy.io.fits.header]
  20. WARNING:astropy:Header block contains null bytes instead of spaces for padding, and is not FITS-compliant. Nulls may be replaced with spaces upon writing.
  21. WARNING: FITSFixedWarning: 'celfix' made the change 'Linear transformation matrix is singular'. [astropy.wcs.wcs]
  22. WARNING:astropy:FITSFixedWarning: 'celfix' made the change 'Linear transformation matrix is singular'.
  23. ---------------------------------------------------------------------------
  24. SingularMatrixError Traceback (most recent call last)
  25. <ipython-input-3-165e2b31c6c4> in <module>()
  26. ----> 1 s1d = specutils.wcs_fits_reader.wcs1d_fits('test_L1455IRS1_DCN2-1.fits')
  27. 2
  28.  
  29. /Users/tsrice/anaconda3/lib/python3.6/site-packages/specutils-0.1.dev727-py3.6.egg/specutils/io/registers.py in wrapper(*args, **kwargs)
  30. 32 @wraps(func)
  31. 33 def wrapper(*args, **kwargs):
  32. ---> 34 return func(*args, **kwargs)
  33. 35 return wrapper
  34. 36 return decorator
  35.  
  36. /Users/tsrice/anaconda3/lib/python3.6/site-packages/specutils-0.1.dev727-py3.6.egg/specutils/io/default_loaders/wcs_fits_reader.py in wcs1d_fits(file_name, spectral_axis_unit, **kwargs)
  37. 37 with fits.open(file_name, **kwargs) as hdulist:
  38. 38 header = hdulist[0].header
  39. ---> 39 wcs = WCS(header)
  40. 40
  41. 41 if 'BUNIT' in header:
  42.  
  43. /Users/tsrice/anaconda3/lib/python3.6/site-packages/astropy/wcs/wcs.py in __init__(self, header, fobj, key, minerr, relax, naxis, keysel, colsel, fix, translate_units, _do_set)
  44. 501
  45. 502 if _do_set:
  46. --> 503 self.wcs.set()
  47. 504
  48. 505 for fd in close_fds:
  49.  
  50. SingularMatrixError: ERROR 3 in wcsset() at line 2213 of file cextern/wcslib/C/wcs.c:
  51. Linear transformation matrix is singular.
  52. ERROR 3 in linset() at line 607 of file cextern/wcslib/C/lin.c:
  53. PCi_ja matrix is singular.
  54.  
  55. In [5]: from astropy.io.fits import getdata
  56.  
  57. In [6]: data, header = getdata("test_L1455IRS1_DCN2-1.fits", header=True)
  58. WARNING: Header block contains null bytes instead of spaces for padding, and is not FITS-compliant. Nulls may be replaced with spaces upon writing. [astropy.io.fits.header]
  59. WARNING:astropy:Header block contains null bytes instead of spaces for padding, and is not FITS-compliant. Nulls may be replaced with spaces upon writing.
  60.  
  61. In [10]: data
  62. Out[10]:
  63. array([[[[-0.00654329, 0.01778164, -0.01153884, ..., -0.01729367,
  64. 0.01069437, -0.01851475]]]])
  65.  
  66. In [11]: data.shape
  67. Out[11]: (1, 1, 1, 37275)
  68.  
  69. In [7]: header
  70. Out[7]:
  71. SIMPLE = T /
  72. BITPIX = -64
  73. NAXIS = 4 /
  74. NAXIS1 = 37275 /
  75. NAXIS2 = 1 /
  76. NAXIS3 = 1 /
  77. NAXIS4 = 1 /
  78. BLOCKED = T /
  79. DATAMIN = -0.146224617958E+000 /
  80. DATAMAX = 0.140489089489E+001 /
  81. BUNIT = 'K ' /
  82. CTYPE1 = 'FREQ ' /
  83. CRVAL1 = 0.000000000000E+000 / Offset frequency
  84. CDELT1 = 0.488281250000E+005 / Frequency resolution
  85. CRPIX1 = 0.176140019531E+005 /
  86. CTYPE2 = 'RA---GLS' /
  87. EQUINOX = 0.200000000000E+004 /
  88. CRVAL2 = 0.519129166667E+002 /
  89. CDELT2 = 0.000000000000E+000 /
  90. CRPIX2 = 0.000000000000E+000 /
  91. CTYPE3 = 'DEC--GLS' /
  92. CRVAL3 = 0.302175000000E+002 /
  93. CDELT3 = 0.000000000000E+000 /
  94. CRPIX3 = 0.000000000000E+000 /
  95. CTYPE4 = 'STOKES ' /
  96. CRVAL4 = 1.0000000000000 /
  97. CDELT4 = 0.0000000000000 /
  98. CRPIX4 = 0.0000000000000 /
  99. TELESCOP= '30ME1-LI-F0-' /
  100. OBJECT = 'L1455IRS1 ' /
  101. LINE = 'DCN(2-1) ' / Line name
  102. RESTFREQ= 0.144828001000E+012 / Rest frequency
  103. VELO-LSR= 0.500000000000E+004 / Velocity of reference channel
  104. DELTAV = -0.101073712111E+003 / Velocity spacing of channels
  105. IMAGFREQ= 0.157326768103E+012 / Image frequency
  106. TSYS = 0.845444717407E+002 / System temperature
  107. OBSTIME = 0.165860595703E+004 / Integration time
  108. SCAN-NUM= 0.100000000000E+001 / Scan number
  109. TAU-ATM = 0.288365986198E-001 / Atmospheric opacity
  110. NPHASE = 1 / Number of frequency phases
  111. DELTAF1 = 0.000000000000E+000 / Frequency offset Phase 1
  112. PTIME1 = 0.498978763819E+000 / Duration of Phase 1
  113. WEIGHT1 = 0.000000000000E+000 / Weight of Phase 1
  114. GAINIMAG= 0.501190014184E-001 / Image sideband gain ratio
  115. BEAMEFF = 0.930000007153E+000 / Beam efficiency
  116. FORWEFF = 0.930000007153E+000 / Image sideband gain ratio
  117. ORIGIN = 'CLASS-Grenoble ' /
  118. DATE = '2017-09-21T00:00:00.000' / Date written
  119. TIMESYS = 'UTC ' /
  120. DATE-OBS= '2014-12-26T18:48:39.588' / Date observed
  121. DATE-RED= '2017-09-21T00:00:00.000' / Date reduced
  122. ELEVATIO= 0.592332514636E+002 / Telescope elevation
  123. AZIMUTH = 0.000000000000E+000 / Telescope azimuth
  124. UT = ' 18:48:39.588' / Universal time at start
  125. LST = ' 00:55:48.714' / Sideral time at start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement