summaryrefslogtreecommitdiff
path: root/doc/source/hstwcs_ui.rst
blob: 7a09af42e6c831a1ba6a8b32822906d9b2b16858 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.. _hstwcs_ui:

**************************************
HSTWCS UI Examples
**************************************
- Create an HSTWCS object using a pyfits HDUList and an extension number 

  fobj = pyfits.open('some_file.fits')

  w = wcsutil.HSTWCS(fobj, 3)

- Create an HSTWCS object using a qualified file name. 

  w = wcsutil.HSTWCS('j9irw4b1q_flt.fits[sci,1]')

- Create an HSTWCS object using a file name and an extension number. 

  w = wcsutil.HSTWCS('j9irw4b1q_flt.fits', ext=2)
  
- Create an HSTWCS object from WCS with key 'O'.

  w = wcsutil.HSTWCS('j9irw4b1q_flt.fits', ext=2, wcskey='O')

- Create a template HSTWCS object for a DEFAULT object.

  w = wcsutil.HSTWCS(instrument='DEFAULT')