Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. IPython profile: pyraf In [1]:">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pyraf short Tutorial and little help on HW2 ASTR 3010 Lecture 19 Textbook N/A.

Similar presentations


Presentation on theme: "Pyraf short Tutorial and little help on HW2 ASTR 3010 Lecture 19 Textbook N/A."— Presentation transcript:

1 Pyraf short Tutorial and little help on HW2 ASTR 3010 Lecture 19 Textbook N/A

2 Right after your 1 st login Create a subdirectory you will work onCreate a subdirectory you will work on prompt> mkdir photometry_project prompt> cd photometry_project Copy relevant filesCopy relevant files prompt> cp –a../../ImagingData/*. Setup for PyrafSetup for Pyraf prompt> mkiraf Terminal types: xgterm,xterm,gterm,vt640,vt100,etc. Enter terminal type: xgterm prompt> Create a subdirectory to store original FITS fileCreate a subdirectory to store original FITS file prompt> mkdir BackUp

3 Start a iraf session StartingStarting prompt> pyraf –n –ipythonor simply type ‘ecl’ to get into the IRAF NOAO/IRAFNET PC-IRAF Revision Mon Sep 15 10:12:05 MST 2008 NOAO/IRAFNET PC-IRAF Revision Mon Sep 15 10:12:05 MST 2008 This is the RELEASED version of IRAF V2.14 supporting PC systems. This is the RELEASED version of IRAF V2.14 supporting PC systems. Welcome to IRAF. To list the available commands, type ? or ??. To get Welcome to IRAF. To list the available commands, type ? or ??. To get detailed information about a command, type `help '. To run a detailed information about a command, type `help '. To run a command or load a package, type its name. Type `bye' to exit a command or load a package, type its name. Type `bye' to exit a package, or `logout' to get out of the CL. Type `news' to find out package, or `logout' to get out of the CL. Type `news' to find out what is new in the version of the system you are using. what is new in the version of the system you are using. Visit if you have questions or to report problems. Visit if you have questions or to report problems. The following commands or packages are currently defined: The following commands or packages are currently defined:clpackage/: clpackage/ language/ plot/ system/ clpackage/ language/ plot/ system/ dataio/ lists/ proto/ tables/ dataio/ lists/ proto/ tables/ dbms/ noao/ softools/ user/ dbms/ noao/ softools/ user/ images/ obsolete/ stsdas/ utilities/ images/ obsolete/ stsdas/ utilities/ PyRAF 1.9 (May 2010) Copyright (c) 2002 AURA PyRAF traceback display: on Python (r265:79063, Apr , 13:57:41) Type "copyright", "credits" or "license" for more information. IPython An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. IPython profile: pyraf In [1]:

4 Assign parameters for CCDRED etc. In [1]: imred imred/: argus/ ctioslit/ hydra/ kpnocoude/ vtel/ argus/ ctioslit/ hydra/ kpnocoude/ vtel/ bias/ dtoi/ iids/ kpnoslit/ bias/ dtoi/ iids/ kpnoslit/ ccdred/ echelle/ irred/ quadred/ ccdred/ echelle/ irred/ quadred/ crutil/ generic/ irs/ specred/ crutil/ generic/ irs/ specred/ In [2]: ccdred ccdred/: badpiximage ccdlist combine mkillumcor setinstrument badpiximage ccdlist combine mkillumcor setinstrument ccdgroups ccdmask darkcombine mkillumflat zerocombine ccdgroups ccdmask darkcombine mkillumflat zerocombine ccdhedit ccdproc flatcombine mkskycor ccdhedit ccdproc flatcombine mkskycor ccdinstrument ccdtest mkfringecor mkskyflat ccdinstrument ccdtest mkfringecor mkskyflat In [3]: cl < efosc.cl In [4]: lpar ccdred (pixeltype = "real real") Output and calculation pixel datatypes (pixeltype = "real real") Output and calculation pixel datatypes (verbose = yes) Print log information to the standard output? (verbose = yes) Print log information to the standard output? (logfile = "ccdred.log") Text log file (logfile = "ccdred.log") Text log file (plotfile = "") Log metacode plot file (plotfile = "") Log metacode plot file (backup = "BackUp/") Backup directory or prefix (backup = "BackUp/") Backup directory or prefix (instrument = "efosc.dat") CCD instrument file (instrument = "efosc.dat") CCD instrument file (ssfile = "subsets") Subset translation file (ssfile = "subsets") Subset translation file (graphics = "stdgraph") Interactive graphics output device (graphics = "stdgraph") Interactive graphics output device (cursor = "") Graphics cursor input (cursor = "") Graphics cursor input (version = "2: October 1987") (version = "2: October 1987") (mode = "al") (mode = "al") In [5]:

5 Step1: zerocombine In [9]: lpar zerocombine input = "D*.fits" List of zero level images to combine input = "D*.fits" List of zero level images to combine (output = "Zero") Output zero level name (output = "Zero") Output zero level name (combine = "median") Type of combine operation (combine = "median") Type of combine operation (reject = "none") Type of rejection (reject = "none") Type of rejection (ccdtype = "zero") CCD image type to combine (ccdtype = "zero") CCD image type to combine (process = yes) Process images before combining? (process = yes) Process images before combining? (delete = no) Delete input images after combining? (delete = no) Delete input images after combining? (clobber = no) Clobber existing output image? (clobber = no) Clobber existing output image? (scale = "none") Image scaling (scale = "none") Image scaling (statsec = "") Image section for computing statistics (statsec = "") Image section for computing statistics (nlow = 0) minmax: Number of low pixels to reject (nlow = 0) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.0) Lower sigma clipping factor (lsigma = 3.0) Lower sigma clipping factor (hsigma = 3.0) Upper sigma clipping factor (hsigma = 3.0) Upper sigma clipping factor (rdnoise = "0.") ccdclip: CCD readout noise (electrons) (rdnoise = "0.") ccdclip: CCD readout noise (electrons) (gain = "1.") ccdclip: CCD gain (electrons/DN) (gain = "1.") ccdclip: CCD gain (electrons/DN) (snoise = "0.") ccdclip: Sensitivity noise (fraction) (snoise = "0.") ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (pclip = -0.5) pclip: Percentile clipping parameter (blank = 0.0) Value if there are no pixels (blank = 0.0) Value if there are no pixels (mode = "al") (mode = "al") In [10]:

6 Step1: zerocombine In [11]: zerocombine List of zero level images to combine ('D*.fits'): D46.fits: Oct 25 16:09 Bad pixel file is BPM.fits D47.fits: Oct 25 16:09 Bad pixel file is BPM.fits D48.fits: Oct 25 16:09 Bad pixel file is BPM.fits D49.fits: Oct 25 16:09 Bad pixel file is BPM.fits D50.fits: Oct 25 16:09 Bad pixel file is BPM.fits D51.fits: Oct 25 16:09 Bad pixel file is BPM.fits D52.fits: Oct 25 16:09 Bad pixel file is BPM.fits Oct 25 16:09: IMCOMBINE combine = median, scale = none, zero = none, weight = none combine = median, scale = none, zero = none, weight = none blank = 0. blank = 0. Images Images D46.fits D46.fits D47.fits D47.fits D48.fits D48.fits D49.fits D49.fits D50.fits D50.fits D51.fits D51.fits D52.fits D52.fits Output image = Zero, ncombine = 7 Output image = Zero, ncombine = 7 In [12]:

7 Step2: flatcombine In [12]: lpar flatcombine input = List of flat field images to combine input = List of flat field images to combine (output = "Flat") Output flat field root name (output = "Flat") Output flat field root name (combine = "median") Type of combine operation (combine = "median") Type of combine operation (reject = "avsigclip") Type of rejection (reject = "avsigclip") Type of rejection (ccdtype = "flat") CCD image type to combine (ccdtype = "flat") CCD image type to combine (process = yes) Process images before combining? (process = yes) Process images before combining? (subsets = yes) Combine images by subset parameter? (subsets = yes) Combine images by subset parameter? (delete = no) Delete input images after combining? (delete = no) Delete input images after combining? (clobber = no) Clobber existing output image? (clobber = no) Clobber existing output image? (scale = "mode") Image scaling (scale = "mode") Image scaling (statsec = "") Image section for computing statistics (statsec = "") Image section for computing statistics (nlow = 1) minmax: Number of low pixels to reject (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.0) Lower sigma clipping factor (lsigma = 3.0) Lower sigma clipping factor (hsigma = 3.0) Upper sigma clipping factor (hsigma = 3.0) Upper sigma clipping factor (rdnoise = "0.") ccdclip: CCD readout noise (electrons) (rdnoise = "0.") ccdclip: CCD readout noise (electrons) (gain = "1.") ccdclip: CCD gain (electrons/DN) (gain = "1.") ccdclip: CCD gain (electrons/DN) (snoise = "0.") ccdclip: Sensitivity noise (fraction) (snoise = "0.") ccdclip: Sensitivity noise (fraction) (pclip = -0.5) pclip: Percentile clipping parameter (pclip = -0.5) pclip: Percentile clipping parameter (blank = 1.0) Value if there are no pixels (blank = 1.0) Value if there are no pixels (mode = "al") (mode = "al") In [13]:

8 Step2: flatcombine In [13]: flatcombine D01.fits: Oct 25 16:10 Bad pixel file is BPM.fits D01.fits: Oct 25 16:10 Zero level correction image is Zero D02.fits: Oct 25 16:10 Bad pixel file is BPM.fits D02.fits: Oct 25 16:10 Zero level correction image is Zero D03.fits: Oct 25 16:10 Bad pixel file is BPM.fits D03.fits: Oct 25 16:10 Zero level correction image is Zero … blank = 1. blank = 1. Images Exp Mode Scale Images Exp Mode Scale D06.fits D06.fits D07.fits D07.fits D08.fits D08.fits D09.fits D09.fits D10.fits D10.fits Output image = FlatV_641, ncombine = 5 Output image = FlatV_641, ncombine = 5 Oct 25 16:10: IMCOMBINE combine = median, scale = mode, zero = none, weight = none combine = median, scale = mode, zero = none, weight = none reject = avsigclip, mclip = yes, nkeep = 1 reject = avsigclip, mclip = yes, nkeep = 1 lsigma = 3., hsigma = 3. lsigma = 3., hsigma = 3. blank = 1. blank = 1. Images Exp Mode Scale Images Exp Mode Scale D11.fits D11.fits D12.fits D12.fits D13.fits D13.fits D14.fits D14.fits D15.fits D15.fits Output image = Flati_705, ncombine = 5 Output image = Flati_705, ncombine = 5 In [14]:

9 Step2: flatcombine In [14]: ls BackUp D06.fits D14.fits D22.fits D30.fits D38.fits D46.fits efosc.dat robust_stats.py BPM.fits D07.fits D15.fits D23.fits D31.fits D39.fits D47.fits FlatB_639.fits screenlog.0 ccdred.log D08.fits D16.fits D24.fits D32.fits D40.fits D48.fits Flati_705.fits StandardFields.pdf D01.fits D09.fits D17.fits D25.fits D33.fits D41.fits D49.fits FlatV_641.fits subsets D02.fits D10.fits D18.fits D26.fits D34.fits D42.fits D50.fits login.cl tmp1923a.fits D03.fits D11.fits D19.fits D27.fits D35.fits D43.fits D51.fits mkBPM.py uparm D04.fits D12.fits D20.fits D28.fits D36.fits D44.fits D52.fits pyraf Zero.fits D05.fits D13.fits D21.fits D29.fits D37.fits D45.fits efosc.cl rdfitsfiles.py In [15]: ccdlist D*.fits D01.fits[986,995][real][flat][B_639][BZ]:DOMED02.fits[986,995][real][flat][B_639][BZ]:DOMED03.fits[986,995][real][flat][B_639][BZ]:DOMED04.fits[986,995][real][flat][B_639][BZ]:DOMED05.fits[986,995][real][flat][B_639][BZ]:DOMED06.fits[986,995][real][flat][V_641][BZ]:DOMED07.fits[986,995][real][flat][V_641][BZ]:DOMED08.fits[986,995][real][flat][V_641][BZ]:DOMED09.fits[986,995][real][flat][V_641][BZ]:DOMED10.fits[986,995][real][flat][V_641][BZ]:DOMED11.fits[986,995][real][flat][i_705][BZ]:DOMED12.fits[986,995][real][flat][i_705][BZ]:DOMED13.fits[986,995][real][flat][i_705][BZ]:DOMED14.fits[986,995][real][flat][i_705][BZ]:DOMED15.fits[986,995][real][flat][i_705][BZ]:DOMED16.fits[986,995][real][unknown][B_639]:SKY,FLAT…

10 Step3: ccdproc In [16]: lpar ccdproc images = "D*" List of CCD images to correct images = "D*" List of CCD images to correct (output = "") List of output CCD images (output = "") List of output CCD images (ccdtype = "object") CCD image type to correct (ccdtype = "object") CCD image type to correct (max_cache = 0) Maximum image caching memory (in Mbytes) (max_cache = 0) Maximum image caching memory (in Mbytes) (noproc = no) List processing steps only? (noproc = no) List processing steps only? (fixpix = yes) Fix bad CCD lines and columns? (fixpix = yes) Fix bad CCD lines and columns? (overscan = no) Apply overscan strip correction? (overscan = no) Apply overscan strip correction? (trim = no) Trim the image? (trim = no) Trim the image? (zerocor = yes) Apply zero level correction? (zerocor = yes) Apply zero level correction? (darkcor = no) Apply dark count correction? (darkcor = no) Apply dark count correction? (flatcor = yes) Apply flat field correction? (flatcor = yes) Apply flat field correction? (illumcor = no) Apply illumination correction? (illumcor = no) Apply illumination correction? (fringecor = no) Apply fringe correction? (fringecor = no) Apply fringe correction? (readcor = no) Convert zero level image to readout correction? (readcor = no) Convert zero level image to readout correction? (scancor = no) Convert flat field image to scan correction? (scancor = no) Convert flat field image to scan correction? (readaxis = "line") Read out axis (column|line) (readaxis = "line") Read out axis (column|line) (fixfile = "BPM.fits") File describing the bad lines and columns (fixfile = "BPM.fits") File describing the bad lines and columns (biassec = "") Overscan strip image section (biassec = "") Overscan strip image section (trimsec = "") Trim data section (trimsec = "") Trim data section (zero = "Zero") Zero level calibration image (zero = "Zero") Zero level calibration image (dark = "") Dark count calibration image (dark = "") Dark count calibration image (flat = "Flat*") Flat field images (flat = "Flat*") Flat field images (illum = "") Illumination correction images (illum = "") Illumination correction images (fringe = "") Fringe correction images (fringe = "") Fringe correction images (minreplace = 1.0) Minimum flat field value (minreplace = 1.0) Minimum flat field value (scantype = "shortscan") Scan type (shortscan|longscan) (scantype = "shortscan") Scan type (shortscan|longscan) (nscan = 1) Number of short scan lines (nscan = 1) Number of short scan lines (interactive = no) Fit overscan interactively? (interactive = no) Fit overscan interactively? (function = "legendre") Fitting function (function = "legendre") Fitting function (order = 1) Number of polynomial terms or spline pieces (order = 1) Number of polynomial terms or spline pieces (sample = "*") Sample points to fit (sample = "*") Sample points to fit (naverage = 1) Number of sample points to combine (naverage = 1) Number of sample points to combine (niterate = 1) Number of rejection iterations (niterate = 1) Number of rejection iterations (low_reject = 3.0) Low sigma rejection factor (low_reject = 3.0) Low sigma rejection factor (high_reject = 3.0) High sigma rejection factor (high_reject = 3.0) High sigma rejection factor (grow = 0.0) Rejection growing radius (grow = 0.0) Rejection growing radius (mode = "al") (mode = "al") In [17]:

11 Step3: ccdproc In [17]: ccdproc D34.fits: Oct 25 16:11 Bad pixel file is BPM.fits D34.fits: Oct 25 16:11 Zero level correction image is Zero D34.fits: Oct 25 16:11 Flat field image is FlatB_639.fits with scale= D35.fits: Oct 25 16:11 Bad pixel file is BPM.fits D35.fits: Oct 25 16:11 Zero level correction image is Zero D35.fits: Oct 25 16:11 Flat field image is FlatV_641.fits with scale= D36.fits: Oct 25 16:11 Bad pixel file is BPM.fits … D43.fits: Oct 25 16:11 Bad pixel file is BPM.fits D43.fits: Oct 25 16:11 Zero level correction image is Zero D43.fits: Oct 25 16:11 Flat field image is FlatB_639.fits with scale= D44.fits: Oct 25 16:11 Bad pixel file is BPM.fits D44.fits: Oct 25 16:11 Zero level correction image is Zero D44.fits: Oct 25 16:11 Flat field image is FlatV_641.fits with scale= D45.fits: Oct 25 16:11 Bad pixel file is BPM.fits D45.fits: Oct 25 16:11 Zero level correction image is Zero D45.fits: Oct 25 16:11 Flat field image is Flati_705.fits with scale= In [18]:

12 Step4: check the final result In [18]: ccdlist D*.fits ccdtype=object D34.fits[986,995][real][object][B_639][BZF]:PG D35.fits[986,995][real][object][V_641][BZF]:PG D36.fits[986,995][real][object][i_705][BZF]:PG D37.fits[986,995][real][object][B_639][BZF]:PG D38.fits[986,995][real][object][V_641][BZF]:PG D39.fits[986,995][real][object][i_705][BZF]:PG D40.fits[986,995][real][object][B_639][BZF]:PG D41.fits[986,995][real][object][V_641][BZF]:PG D42.fits[986,995][real][object][i_705][BZF]:PG D43.fits[986,995][real][object][B_639][BZF]:TargetD44.fits[986,995][real][object][V_641][BZF]:TargetD45.fits[986,995][real][object][i_705][BZF]:Target In [19]: display D44 1 In [20]:

13 Step5: Setup for photometry In [20]: digiphot In [21]: apphot In [22]: lpar qphot image = "D43" The input image(s) image = "D43" The input image(s) cbox = 5.0 The centering box width in pixels cbox = 5.0 The centering box width in pixels annulus = 10.0 The inner radius of sky annulus in pixels annulus = 10.0 The inner radius of sky annulus in pixels dannulus = 3.0 The width of the sky annulus in pixels dannulus = 3.0 The width of the sky annulus in pixels apertures = "5.0" The list of photometry apertures apertures = "5.0" The list of photometry apertures (coords = "") The input coordinate file(s) (default: *.coo.?) (coords = "") The input coordinate file(s) (default: *.coo.?) (output = "default") The output photometry file(s) (default: *.mag.?) (output = "default") The output photometry file(s) (default: *.mag.?) (plotfile = "") The output plot metacode file (plotfile = "") The output plot metacode file (zmag = 25.0) The zero point of the magnitude scale (zmag = 25.0) The zero point of the magnitude scale (exposure = "EXPTIME") The exposure time image header keyword (exposure = "EXPTIME") The exposure time image header keyword (airmass = "AIRMASS") The airmass image header keyword (airmass = "AIRMASS") The airmass image header keyword (filter = "FILTER1") The filter image header keyword (filter = "FILTER1") The filter image header keyword (obstime = "UT") The time of observation image header keyword (obstime = "UT") The time of observation image header keyword (epadu = 1.0) The instrument gain in e-/ADU (epadu = 1.0) The instrument gain in e-/ADU (interactive = yes) Interactive mode ? (interactive = yes) Interactive mode ? (radplots = yes) Plot the radial profiles in interactive mode ? (radplots = yes) Plot the radial profiles in interactive mode ? (icommands = "") Image cursor: [x y wcs] key [cmd] (icommands = "") Image cursor: [x y wcs] key [cmd] (gcommands = "") Graphics cursor: [x y wcs] key [cmd] (gcommands = "") Graphics cursor: [x y wcs] key [cmd] (wcsin = ")_.wcsin") The input coordinate system (logical,tv,physical,world) (wcsin = ")_.wcsin") The input coordinate system (logical,tv,physical,world) (wcsout = ")_.wcsout") The output coordinate system (logical,tv,physical) (wcsout = ")_.wcsout") The output coordinate system (logical,tv,physical) (cache = )_.cache) Cache input image pixels in memory ? (cache = )_.cache) Cache input image pixels in memory ? (verbose = )_.verbose) Print messages in non-interactive mode ? (verbose = )_.verbose) Print messages in non-interactive mode ? (graphics = ")_.graphics") Graphics device (graphics = ")_.graphics") Graphics device (display = ")_.display") Display device (display = ")_.display") Display device (mode = "ql") (mode = "ql") In [23]:

14 Step6: Doing photometry with ‘qphot’ In [23]: qphot D43 The centering box width in pixels (5.0): The inner radius of sky annulus in pixels (0.0:) (10.0): The width of the sky annulus in pixels (1.0:) (3.0): The list of photometry apertures (' '): 5.0 Warning: Graphics overlay not available for display device. D ok D ok … In [24]: cat D43.mag.1 #K IRAF = NOAO/IRAFV version %-23s #K USER = song name %-23s …# D nullfile 0 \ NoError \ NoError \ NoError \ NoError \ 1. INDEF INDEF INDEF \ 1. INDEF INDEF INDEF \ NoError NoError D nullfile 0 \ NoError \ NoError \ NoError \ NoError \ 1. INDEF INDEF INDEF \ 1. INDEF INDEF INDEF \ NoError NoError Here, you will do an interactive photometry on ds9…

15 HW#2 (B-V)Vb(1)b(2)v(1)v(2) Airmass Star A Star B Star C Star D

16 HW#2 plot (b2 – b1)/(airmass2 – airmass1) plot (b2 – b1)/(airmass2 – airmass1) (B-V)Vb(1)b(2)v(1)v(2) Airmass Star A Star B Star C Star D

17 HW#2 same thing for v1 and v2 same thing for v1 and v2 (B-V)Vb(1)b(2)v(1)v(2) Airmass Star A Star B Star C Star D

18 HW#2 same thing for v1 and v2 same thing for v1 and v2 Using these two relations and Using these two relations and calculate m b and m v (i.e., extinction corrected b and v magntiudes). (e.g.) b1_outside = b1 – 1.05*[0.766 – 0.147*(B-V)] (B-V)Vb(1)b(2)v(1)v(2) Airmass Star A Star B Star C Star D

19 HW#2 Extinction corrected b and v mags. Extinction corrected b and v mags. Let’s use b_new and v_new to denote extinction corrected mags. (B-V)Vb(1)b(2)v(1)v(2) Airmass Star A Star B Star C Star D B-band V-band star A star B star C star D

20 HW#2 plot b_catalog – b_new versus B-V plot b_catalog – b_new versus B-V (B-V)Vb(1)b(2)v(1)v(2)Airmass Star A Star B Star C Star D B-bandV-band ?

21 3. Calculate standard magnitudes of Obj1 (i.e., V and B-V) whose instrumental magnitudes are v=9.850 and b= taken at airmass=1.50 b_outside= – (0.766 – 0.147*( ))*1.50 = this value is m b = this value is m bv_outside=?

22 In summary… Important Concepts Understand the concept of extinction correction and standard transformation!! Important Terms N/A Chapter/sections covered in this lecture : N/A


Download ppt "Pyraf short Tutorial and little help on HW2 ASTR 3010 Lecture 19 Textbook N/A."

Similar presentations


Ads by Google