{ "cells": [ { "cell_type": "markdown", "id": "6d57c42d", "metadata": {}, "source": [ "# Import all modules & format terminal" ] }, { "cell_type": "code", "execution_count": 1, "id": "ad29eed6", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "from astropy.io import fits\n", "import astropy\n", "import math\n", "import matplotlib.pyplot as plt\n", "from matplotlib.colors import LogNorm\n", "import colorcet as cc\n", "from acstools import acszpt\n", "from astropy.table import Table\n", "%matplotlib qt\n" ] }, { "cell_type": "markdown", "id": "1d2650e1", "metadata": {}, "source": [ "# w814 filter" ] }, { "cell_type": "markdown", "id": "44ad0952", "metadata": {}, "source": [ "## import data" ] }, { "cell_type": "code", "execution_count": 2, "id": "ed509f2b", "metadata": {}, "outputs": [], "source": [ "image_data_w814_fireball, header_w814_fireball = fits.getdata(\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F814W_ivm_drz_cl_ver2.fits\", header=True)" ] }, { "cell_type": "code", "execution_count": 3, "id": "1f94565f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Filename: C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F814W_ivm_drz_cl_ver2.fits\n", "No. Name Ver Type Cards Dimensions Format\n", " 0 PRIMARY 1 PrimaryHDU 503 () \n", " 1 SCI 1 ImageHDU 179 (4225, 4300) float32 \n", " 2 WHT 1 ImageHDU 71 (4225, 4300) float32 \n", " 3 CTX 1 ImageHDU 71 (4225, 4300) int32 \n" ] } ], "source": [ "hdu_list = fits.open(\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F814W_ivm_drz_cl_ver2.fits\")\n", "image_data = hdu_list[1].data\n", "hdu_list.info()" ] }, { "cell_type": "code", "execution_count": 4, "id": "ea2bb4f9", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING: VerifyWarning: Verification reported errors: [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Verification reported errors:\n", "WARNING: VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '7.07236e-20 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard. [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '7.07236e-20 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard.\n", "WARNING: VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", " [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", "\n" ] }, { "data": { "text/plain": [ "XTENSION= 'IMAGE ' / Image extension \n", "BITPIX = -32 / Bits per pixel \n", "NAXIS = 2 / Number of axes \n", "NAXIS1 = 4225 / Axis length \n", "NAXIS2 = 4300 / Axis length \n", "PCOUNT = 0 / No 'random' parameters \n", "GCOUNT = 1 / Only one group \n", "ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator \n", "EXTNAME = 'SCI ' / Extension name \n", "EXTVER = 1 / Extension version \n", "DATE = '2007-05-08T15:43:49' / Date FITS file was generated \n", "IRAF-TLM= '21:07:50 (27/04/2009)' / Time of last modification \n", "INHERIT = T / inherit the primary header \n", "EXPNAME = 'j9ty75pxq ' / exposure identifier \n", "BUNIT = 'ELECTRONS' / brightness units \n", " \n", " / WFC CCD CHIP IDENTIFICATION \n", " \n", "CCDCHIP = '-999 ' / CCD chip (1 or 2) \n", " \n", " / World Coordinate System and Related Parameters \n", " \n", "WCSAXES = 2 / number of World Coordinate System axes \n", "CRPIX1 = 2.115074520E+03 / x-coordinate of reference pixel \n", "CRPIX2 = 2.154059514E+03 / y-coordinate of reference pixel \n", "CRVAL1 = 1.947033233E+02 / first axis value at reference pixel \n", "CRVAL2 = 2.777017191E+01 / second axis value at reference pixel \n", "CTYPE1 = 'RA---TAN' / the coordinate type for the first axis \n", "CTYPE2 = 'DEC--TAN' / the coordinate type for the second axis \n", "CD1_1 = -2.411211755E-06 / partial of first axis coordinate w.r.t. x \n", "CD1_2 = -1.367452457E-05 / partial of first axis coordinate w.r.t. y \n", "CD2_1 = -1.366811852E-05 / partial of second axis coordinate w.r.t. x \n", "CD2_2 = 2.415297744E-06 / partial of second axis coordinate w.r.t. y \n", "LTV1 = 0.0000000E+00 / offset in X to subsection start \n", "LTV2 = 0.0000000E+00 / offset in Y to subsection start \n", "LTM1_1 = 1.0 / reciprocal of sampling rate in X \n", "LTM2_2 = 1.0 / reciprocal of sampling rate in Y \n", "ORIENTAT= -79.9980746536114 / position angle of image y axis (deg. e of n) \n", "RA_APER = 1.946999401583E+02 / RA of aperture reference position \n", "DEC_APER= 2.777020287706E+01 / Declination of aperture reference position \n", "PA_APER = -82.4473 / Position Angle of reference aperture center (de\n", "VAFACTOR= 1.000101795126E+00 / velocity aberration plate scale factor \n", " \n", " / READOUT DEFINITION PARAMETERS \n", " \n", "CENTERA1= 2073 / subarray axis1 center pt in unbinned dect. pix \n", "CENTERA2= 1035 / subarray axis2 center pt in unbinned dect. pix \n", "SIZAXIS1= 4096 / subarray axis1 size in unbinned detector pixels\n", "SIZAXIS2= 2048 / subarray axis2 size in unbinned detector pixels\n", "BINAXIS1= 1 / axis1 data bin size in unbinned detector pixels\n", "BINAXIS2= 1 / axis2 data bin size in unbinned detector pixels\n", " \n", " / PHOTOMETRY KEYWORDS \n", " \n", "PHOTMODE= 'ACS WFC1 F814W' / observation con \n", "PHOTFLAM= 7.07236E-20 / inverse sensitivity, ergs/cm2/Ang/electron \n", "PHOTZPT = -21.1 / ST magnitude zero point \n", "PHOTPLAM= 8059.7583 / Pivot wavelength (Angstroms) \n", "PHOTBW = 654.65045 / RMS bandwidth of filter plus detector \n", " \n", " / REPEATED EXPOSURES INFO \n", " \n", "NCOMBINE= 4 / number of image sets combined during CR rejecti\n", " \n", " / DATA PACKET INFORMATION \n", " \n", "FILLCNT = 0 / number of segments containing fill \n", "ERRCNT = 0 / number of segments containing errors \n", "PODPSFF = F / podps fill present (T/F) \n", "STDCFFF = F / ST DDF fill present (T/F) \n", "STDCFFP = 'x5569 ' / ST DDF fill pattern (hex) \n", " \n", " / ON-BOARD COMPRESSION INFORMATION \n", " \n", "WFCMPRSD= F / was WFC data compressed? (T/F) \n", "CBLKSIZ = 0 / size of compression block in 2-byte words \n", "LOSTPIX = 0 / #pixels lost due to buffer overflow \n", "COMPTYP = 'None ' / compression type performed (Partial/Full/None) \n", " \n", " / IMAGE STATISTICS AND DATA QUALITY FLAGS \n", " \n", "NGOODPIX= 7975634 / number of good pixels \n", "SDQFLAGS= 31743 / serious data quality flags \n", "GOODMIN = -2.5757349E+02 / minimum value of good pixels \n", "GOODMAX = 6.9083531E+04 / maximum value of good pixels \n", "GOODMEAN= 3.1252439E+01 / mean value of good pixels \n", "SOFTERRS= 0 / number of soft error pixels (DQF=1) \n", "SNRMIN = -2.0368228E+00 / minimum signal to noise of good pixels \n", "SNRMAX = 2.1555562E+02 / maximum signal to noise of good pixels \n", "SNRMEAN = 3.3560665E+00 / mean value of signal to noise of good pixels \n", "MEANDARK= 5.9055942E-01 / average of the dark values subtracted \n", "MEANBLEV= 2.2617083E+03 / average of all bias levels subtracted \n", "MEANFLSH= 0.000000 / Mean number of counts in post flash exposure \n", "OCRVAL1 = 194.7197271993 / first axis value at reference pixel \n", "OCRVAL2 = 27.76780442544 / second axis value at reference pixel \n", "OCRPIX2 = 1024.0 / y-coordinate of reference pixel \n", "OCRPIX1 = 2100.0 / x-coordinate of reference pixel \n", "ONAXIS2 = 2048 / Axis length \n", "ONAXIS1 = 4096 / Axis length \n", "OCD2_2 = 1.89501E-06 / partial of second axis coordinate w.r.t. y \n", "OCD2_1 = -1.35713E-05 / partial of second axis coordinate w.r.t. x \n", "OORIENTA= -82.20950553990684 / position angle of image y axis (deg. e of n) \n", "OCTYPE1 = 'RA---TAN' / the coordinate type for the first axis \n", "OCD1_1 = -2.81298E-06 / partial of first axis coordinate w.r.t. x \n", "OCD1_2 = -1.3851E-05 / partial of first axis coordinate w.r.t. y \n", "OCTYPE2 = 'DEC--TAN' / the coordinate type for the second axis \n", "WCSCDATE= '11:44:09 (08/05/2007)' / Time WCS keywords were copied. \n", "A_0_2 = 2.166260454268875E-06 \n", "B_0_2 = -7.23056869992757E-06 \n", "A_1_1 = -5.203768315707779E-06 \n", "B_1_1 = 6.17195785471143E-06 \n", "A_2_0 = 8.544323265200852E-06 \n", "B_2_0 = -1.747863188959961E-06 \n", "A_0_3 = 8.431358260282486E-12 \n", "B_0_3 = -4.213561938536148E-10 \n", "A_1_2 = -5.296239040796847E-10 \n", "B_1_2 = -6.698232528165276E-11 \n", "A_2_1 = -4.307559746211637E-11 \n", "B_2_1 = -5.15555867796996E-10 \n", "A_3_0 = -4.756764569697897E-10 \n", "B_3_0 = 8.450579199612846E-11 \n", "A_0_4 = 1.277237876755691E-14 \n", "B_0_4 = 2.939700535576121E-15 \n", "A_1_3 = -1.755261026719722E-14 \n", "B_1_3 = 1.835361339885834E-14 \n", "A_2_2 = 3.825027014656598E-14 \n", "B_2_2 = -2.789700821253248E-14 \n", "A_3_1 = 6.11248660506612E-15 \n", "B_3_1 = 2.409809456230634E-16 \n", "A_4_0 = 2.60134165706541E-14 \n", "B_4_0 = -1.728774625189572E-14 \n", "A_ORDER = 4 \n", "B_ORDER = 4 \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "HISTORY Astrometric solution by SCAMP version 1.4.0-MP (2008-01-27) \n", "COMMENT (c) Emmanuel BERTIN \n", "EQUINOX = 2.000000000E+03 / Mean equinox \n", "RADECSYS= 'ICRS ' / Astrometric system \n", "CUNIT1 = 'deg ' / Axis unit \n", "CUNIT2 = 'deg ' / Axis unit \n", "XCRVAL1 = 1.947033233E+02 / Previous World Coordinate on this axis \n", "XCRVAL2 = 2.777017191E+01 / Previous World Coordinate on this axis \n", "XCRPIX1 = 2.112500000E+03 / Previous World Coordinate on this axis \n", "XCRPIX2 = 2.150000000E+03 / Previous World Coordinate on this axis \n", "XCD1_1 = -2.412403172E-06 / Previous Linear Projection Matrix \n", "XCD1_2 = -1.367873035E-05 / Previous Linear Projection Matrix \n", "XCD2_1 = -1.367873035E-05 / Previous Linear Projection Matrix \n", "XCD2_2 = 2.412403172E-06 / Previous Linear Projection Matrix \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "header_w814_fireball" ] }, { "cell_type": "code", "execution_count": 4, "id": "f6d0ce65", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[-0.01948908, -0.06138653, 0.00473011, ..., 0. ,\n", " 0. , 0. ],\n", " [ 0.01288939, -0.01733125, 0.01123847, ..., 0. ,\n", " 0. , 0. ],\n", " [-0.02398009, 0.01929787, 0.00155553, ..., 0. ,\n", " 0. , 0. ],\n", " ...,\n", " [ 0. , 0. , 0. , ..., -0.00296626,\n", " 0.00758985, 0. ],\n", " [ 0. , 0. , 0. , ..., -0.00940749,\n", " 0.02341227, 0. ],\n", " [ 0. , 0. , 0. , ..., 0.01901661,\n", " 0.02487982, 0. ]], dtype=float32)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "image_data_w814_fireball" ] }, { "cell_type": "code", "execution_count": 5, "id": "cad38a5a", "metadata": {}, "outputs": [], "source": [ "i = []\n", "for char in image_data_w814_fireball:\n", " i.append(min(char))" ] }, { "cell_type": "code", "execution_count": 6, "id": "558bd81b", "metadata": {}, "outputs": [], "source": [ "i.sort()" ] }, { "cell_type": "code", "execution_count": 7, "id": "8d36411e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[-0.3722971,\n", " -0.24163023,\n", " -0.23161036,\n", " -0.13265155,\n", " -0.10425752,\n", " -0.09599361,\n", " -0.091979854,\n", " -0.089358136,\n", " -0.080537245,\n", " -0.07926244,\n", " -0.07812617,\n", " -0.078026794,\n", " -0.07748177,\n", " -0.0769608,\n", " -0.07627331,\n", " -0.07536052,\n", " -0.07400083,\n", " -0.073893845,\n", " -0.0738487,\n", " -0.07257119,\n", " -0.07216241,\n", " -0.07211428,\n", " -0.07209525,\n", " -0.071236566,\n", " -0.07102862,\n", " -0.07041607,\n", " -0.07031894,\n", " -0.069757596,\n", " -0.06931946,\n", " -0.06905149,\n", " -0.06769053,\n", " -0.067678005,\n", " -0.06762384,\n", " -0.067470774,\n", " -0.06724015,\n", " -0.067139775,\n", " -0.06706896,\n", " -0.06690196,\n", " -0.0668299,\n", " -0.06678618,\n", " -0.06661229,\n", " -0.06658895,\n", " -0.06652847,\n", " -0.0661965,\n", " -0.06611068,\n", " -0.06588079,\n", " -0.0655101,\n", " -0.06549341,\n", " -0.06524679,\n", " -0.065234035,\n", " -0.065142475,\n", " -0.06474752,\n", " -0.06438322,\n", " -0.06401827,\n", " -0.06379417,\n", " -0.06354842,\n", " -0.063360505,\n", " -0.06334547,\n", " -0.06331195,\n", " -0.06329375,\n", " -0.063034825,\n", " -0.06302887,\n", " -0.062999286,\n", " -0.062466756,\n", " -0.062450435,\n", " -0.062211018,\n", " -0.062017005,\n", " -0.06173693,\n", " -0.0615923,\n", " -0.061386526,\n", " -0.061276197,\n", " -0.06124944,\n", " -0.0610119,\n", " -0.060841974,\n", " -0.060806453,\n", " -0.060798313,\n", " -0.06061157,\n", " -0.060198147,\n", " -0.06004792,\n", " -0.05996701,\n", " -0.0598371,\n", " -0.059589274,\n", " -0.059483472,\n", " -0.059450652,\n", " -0.05939672,\n", " -0.059372365,\n", " -0.059317183,\n", " -0.05927317,\n", " -0.059216622,\n", " -0.058990363,\n", " -0.05881392,\n", " -0.05881105,\n", " -0.05837675,\n", " -0.058255676,\n", " -0.05814909,\n", " -0.058107827,\n", " -0.058085367,\n", " -0.058047235,\n", " -0.057934362,\n", " -0.057922006,\n", " -0.057820186,\n", " -0.05771379,\n", " -0.05763707,\n", " -0.057611298,\n", " -0.057550695,\n", " -0.057452254,\n", " -0.05741246,\n", " -0.057334296,\n", " -0.057292804,\n", " -0.057291392,\n", " -0.05726434,\n", " -0.057120577,\n", " -0.0570382,\n", " -0.05700391,\n", " -0.056912486,\n", " -0.056718674,\n", " -0.056709375,\n", " -0.05664659,\n", " -0.056597117,\n", " -0.0565762,\n", " -0.05654314,\n", " -0.05645078,\n", " -0.05641646,\n", " -0.056380756,\n", " -0.056326967,\n", " -0.056263424,\n", " -0.056200005,\n", " -0.05619554,\n", " -0.056131586,\n", " -0.0560853,\n", " -0.055947784,\n", " -0.055809945,\n", " -0.055783708,\n", " -0.05575723,\n", " -0.055679478,\n", " -0.05552986,\n", " -0.055472504,\n", " -0.05545396,\n", " -0.05542503,\n", " -0.05540518,\n", " -0.05537103,\n", " -0.05529295,\n", " -0.055228,\n", " -0.055073462,\n", " -0.05506877,\n", " -0.055046424,\n", " -0.05497752,\n", " -0.05496803,\n", " -0.054939397,\n", " -0.054908067,\n", " -0.054790627,\n", " -0.05478078,\n", " -0.05476925,\n", " -0.054716337,\n", " -0.054668535,\n", " -0.05446592,\n", " -0.054285154,\n", " -0.05427244,\n", " -0.05424014,\n", " -0.054229118,\n", " -0.054204557,\n", " -0.05416607,\n", " -0.054079916,\n", " -0.054055475,\n", " -0.05404018,\n", " -0.054032017,\n", " -0.053778034,\n", " -0.0537103,\n", " -0.05367931,\n", " -0.053570215,\n", " -0.053569373,\n", " -0.053486522,\n", " -0.053460553,\n", " -0.05341818,\n", " -0.053412907,\n", " -0.053407684,\n", " -0.0533896,\n", " -0.053334754,\n", " -0.053261843,\n", " -0.053252112,\n", " -0.053092334,\n", " -0.052895896,\n", " -0.052875984,\n", " -0.05287529,\n", " -0.05276499,\n", " -0.052742947,\n", " -0.052672055,\n", " -0.052650463,\n", " -0.05262842,\n", " -0.052538782,\n", " -0.052538782,\n", " -0.05253091,\n", " -0.052526396,\n", " -0.05250126,\n", " -0.0524978,\n", " -0.0523841,\n", " -0.052380037,\n", " -0.0523578,\n", " -0.05228466,\n", " -0.052252598,\n", " -0.05216141,\n", " -0.0520976,\n", " -0.05201391,\n", " -0.051944885,\n", " -0.05193373,\n", " -0.0519206,\n", " -0.051904462,\n", " -0.051874187,\n", " -0.05187337,\n", " -0.051812403,\n", " -0.05174755,\n", " -0.051736183,\n", " -0.0517309,\n", " -0.05170968,\n", " -0.05169779,\n", " -0.051658094,\n", " -0.051653035,\n", " -0.051648293,\n", " -0.051646594,\n", " -0.05162929,\n", " -0.051578693,\n", " -0.051500943,\n", " -0.05146619,\n", " -0.051438767,\n", " -0.051410943,\n", " -0.05127111,\n", " -0.051220894,\n", " -0.051192816,\n", " -0.051123638,\n", " -0.051100038,\n", " -0.051095977,\n", " -0.051073935,\n", " -0.05106975,\n", " -0.05103949,\n", " -0.05101214,\n", " -0.050982967,\n", " -0.050962366,\n", " -0.050943334,\n", " -0.05093495,\n", " -0.050931606,\n", " -0.050929092,\n", " -0.050923213,\n", " -0.050888367,\n", " -0.05087853,\n", " -0.05086976,\n", " -0.05084239,\n", " -0.0508033,\n", " -0.05078808,\n", " -0.050783955,\n", " -0.050707012,\n", " -0.050619088,\n", " -0.050598193,\n", " -0.05058054,\n", " -0.050565068,\n", " -0.05054551,\n", " -0.05046318,\n", " -0.05045485,\n", " -0.050433993,\n", " -0.05038936,\n", " -0.050388,\n", " -0.050354697,\n", " -0.05035441,\n", " -0.05033436,\n", " -0.05031868,\n", " -0.050269697,\n", " -0.050255835,\n", " -0.050242208,\n", " -0.05023415,\n", " -0.050188042,\n", " -0.05014115,\n", " -0.050135944,\n", " -0.050117005,\n", " -0.05011476,\n", " -0.050061688,\n", " -0.05000706,\n", " -0.049983446,\n", " -0.04994587,\n", " -0.049920503,\n", " -0.04972738,\n", " -0.04971175,\n", " -0.049675357,\n", " -0.04964862,\n", " -0.049627814,\n", " -0.04958227,\n", " -0.049553894,\n", " -0.049491607,\n", " -0.049461894,\n", " -0.049417235,\n", " -0.04940978,\n", " -0.049332533,\n", " -0.049306106,\n", " -0.04926723,\n", " -0.04919937,\n", " -0.049198624,\n", " -0.049186837,\n", " -0.049184665,\n", " -0.04916563,\n", " -0.049158417,\n", " -0.049152058,\n", " -0.049123093,\n", " -0.049059786,\n", " -0.049040556,\n", " -0.048993085,\n", " -0.048979994,\n", " -0.048955712,\n", " -0.04893042,\n", " -0.04892337,\n", " -0.048885766,\n", " -0.048881523,\n", " -0.04879517,\n", " -0.048780978,\n", " -0.04864364,\n", " -0.048643593,\n", " -0.04860651,\n", " -0.04848998,\n", " -0.04842026,\n", " -0.048363753,\n", " -0.04834756,\n", " -0.048342764,\n", " -0.048308067,\n", " -0.048294645,\n", " -0.04829081,\n", " -0.048278477,\n", " -0.0482308,\n", " -0.048227783,\n", " -0.048222266,\n", " -0.04821873,\n", " -0.048215266,\n", " -0.048148904,\n", " -0.048141792,\n", " -0.04813033,\n", " -0.04809908,\n", " -0.04809721,\n", " -0.04809497,\n", " -0.048076384,\n", " -0.048073586,\n", " -0.04806714,\n", " -0.048052322,\n", " -0.04802639,\n", " -0.048023425,\n", " -0.04798899,\n", " -0.04798024,\n", " -0.047910616,\n", " -0.047900088,\n", " -0.047889177,\n", " -0.047840625,\n", " -0.047786076,\n", " -0.047778606,\n", " -0.047765553,\n", " -0.047762576,\n", " -0.047736414,\n", " -0.047733624,\n", " -0.04772996,\n", " -0.047694143,\n", " -0.047649417,\n", " -0.047646545,\n", " -0.04760913,\n", " -0.047529556,\n", " -0.04751336,\n", " -0.04751196,\n", " -0.047453582,\n", " -0.047448862,\n", " -0.04742722,\n", " -0.047401223,\n", " -0.04737097,\n", " -0.047363937,\n", " -0.047311924,\n", " -0.047295872,\n", " -0.047288764,\n", " -0.047285195,\n", " -0.047225967,\n", " -0.047199864,\n", " -0.047163125,\n", " -0.0471328,\n", " -0.04709371,\n", " -0.047082476,\n", " -0.04707084,\n", " -0.047059275,\n", " -0.04701444,\n", " -0.046983995,\n", " -0.0469521,\n", " -0.046898354,\n", " -0.04684336,\n", " -0.046834797,\n", " -0.046796262,\n", " -0.046746917,\n", " -0.046693876,\n", " -0.046680026,\n", " -0.0466477,\n", " -0.046627965,\n", " -0.046604168,\n", " -0.046590406,\n", " -0.04658531,\n", " -0.046577405,\n", " -0.04657117,\n", " -0.046563145,\n", " -0.04653722,\n", " -0.04650989,\n", " -0.046499256,\n", " -0.04647599,\n", " -0.04647171,\n", " -0.046470057,\n", " -0.046440735,\n", " -0.0464386,\n", " -0.046414923,\n", " -0.04640803,\n", " -0.046401426,\n", " -0.04637827,\n", " -0.04634989,\n", " -0.04634443,\n", " -0.04631689,\n", " -0.04630273,\n", " -0.046252187,\n", " -0.046212394,\n", " -0.046165105,\n", " -0.046165105,\n", " -0.046112712,\n", " -0.04609978,\n", " -0.046069022,\n", " -0.04606729,\n", " -0.046066187,\n", " -0.04603614,\n", " -0.045975737,\n", " -0.045969207,\n", " -0.04595523,\n", " -0.045910973,\n", " -0.045899153,\n", " -0.04588786,\n", " -0.045867413,\n", " -0.04586679,\n", " -0.045838013,\n", " -0.0458323,\n", " -0.04582064,\n", " -0.045808055,\n", " -0.045792438,\n", " -0.045779478,\n", " -0.045760274,\n", " -0.045708846,\n", " -0.045679886,\n", " -0.045672074,\n", " -0.045653585,\n", " -0.045649517,\n", " -0.045648187,\n", " -0.045603536,\n", " -0.045602057,\n", " -0.045601778,\n", " -0.04559806,\n", " -0.045585673,\n", " -0.045577206,\n", " -0.04556367,\n", " -0.045496184,\n", " -0.045490574,\n", " -0.04548627,\n", " -0.045477003,\n", " -0.045453217,\n", " -0.045425076,\n", " -0.045381147,\n", " -0.045341447,\n", " -0.04528248,\n", " -0.045237117,\n", " -0.045225736,\n", " -0.0451889,\n", " -0.04518394,\n", " -0.045139905,\n", " -0.045127615,\n", " -0.045102533,\n", " -0.04506248,\n", " -0.0450622,\n", " -0.0450293,\n", " -0.045019113,\n", " -0.044998806,\n", " -0.04499042,\n", " -0.0449831,\n", " -0.04495252,\n", " -0.04493917,\n", " -0.0448975,\n", " -0.044893995,\n", " -0.04487942,\n", " -0.044867482,\n", " -0.044866268,\n", " -0.04485021,\n", " -0.044815,\n", " -0.044765648,\n", " -0.04474835,\n", " -0.04474724,\n", " -0.044738505,\n", " -0.044714455,\n", " -0.044706162,\n", " -0.044672977,\n", " -0.044579804,\n", " -0.04456788,\n", " -0.04454938,\n", " -0.04454472,\n", " -0.04453715,\n", " -0.04451011,\n", " -0.04450865,\n", " -0.044508073,\n", " -0.04450203,\n", " -0.044495493,\n", " -0.044465616,\n", " -0.044464074,\n", " -0.044446006,\n", " -0.044384353,\n", " -0.044374056,\n", " -0.04435998,\n", " -0.04432672,\n", " -0.044296958,\n", " -0.044219203,\n", " -0.044203583,\n", " -0.044178102,\n", " -0.044150118,\n", " -0.04414257,\n", " -0.044128817,\n", " -0.044126183,\n", " -0.04412154,\n", " -0.044104926,\n", " -0.044081,\n", " -0.04400567,\n", " -0.044000633,\n", " -0.0439768,\n", " -0.043917306,\n", " -0.043915596,\n", " -0.043901112,\n", " -0.043897193,\n", " -0.04388566,\n", " -0.04382925,\n", " -0.04381953,\n", " -0.04380963,\n", " -0.043796748,\n", " -0.043795083,\n", " -0.043766577,\n", " -0.043759182,\n", " -0.043741763,\n", " -0.043739114,\n", " -0.043717973,\n", " -0.04370858,\n", " -0.043706022,\n", " -0.043705977,\n", " -0.043697815,\n", " -0.043673515,\n", " -0.043644685,\n", " -0.043627027,\n", " -0.04361868,\n", " -0.04361612,\n", " -0.043611914,\n", " -0.043609075,\n", " -0.043572895,\n", " -0.043508317,\n", " -0.043504033,\n", " -0.04349567,\n", " -0.04348585,\n", " -0.043457165,\n", " -0.043435734,\n", " -0.04342923,\n", " -0.043415554,\n", " -0.04341229,\n", " -0.043337885,\n", " -0.043326877,\n", " -0.04332276,\n", " -0.04331076,\n", " -0.043305438,\n", " -0.04330203,\n", " -0.0432798,\n", " -0.04327022,\n", " -0.04326932,\n", " -0.04322846,\n", " -0.04322364,\n", " -0.043216694,\n", " -0.043210454,\n", " -0.043192986,\n", " -0.04316111,\n", " -0.043135043,\n", " -0.043132566,\n", " -0.04313082,\n", " -0.043129046,\n", " -0.043110278,\n", " -0.043074593,\n", " -0.043063603,\n", " -0.04305758,\n", " -0.043032575,\n", " -0.04302606,\n", " -0.043020222,\n", " -0.0430123,\n", " -0.04293382,\n", " -0.04293222,\n", " -0.042914283,\n", " -0.042912625,\n", " -0.04291028,\n", " -0.042858087,\n", " -0.042830087,\n", " -0.04282361,\n", " -0.042820852,\n", " -0.042817652,\n", " -0.042802244,\n", " -0.04280137,\n", " -0.042775773,\n", " -0.0427736,\n", " -0.042759605,\n", " -0.04275951,\n", " -0.042754952,\n", " -0.042730935,\n", " -0.042722516,\n", " -0.042716235,\n", " -0.04270982,\n", " -0.04267631,\n", " -0.042663492,\n", " -0.042644933,\n", " -0.04264224,\n", " -0.042637873,\n", " -0.042631127,\n", " -0.04262565,\n", " -0.042583752,\n", " -0.04258179,\n", " -0.04256065,\n", " -0.042555615,\n", " -0.042549968,\n", " -0.042548243,\n", " -0.042541035,\n", " -0.042538952,\n", " -0.042523067,\n", " -0.042520024,\n", " -0.042498495,\n", " -0.042494904,\n", " -0.04248851,\n", " -0.042477615,\n", " -0.0424771,\n", " -0.04246324,\n", " -0.04245056,\n", " -0.042432055,\n", " -0.0424297,\n", " -0.042417366,\n", " -0.042399652,\n", " -0.04239819,\n", " -0.042357102,\n", " -0.042357057,\n", " -0.042356297,\n", " -0.04232212,\n", " -0.042311706,\n", " -0.042304892,\n", " -0.04230296,\n", " -0.04230226,\n", " -0.042247504,\n", " -0.04222593,\n", " -0.04215588,\n", " -0.04215222,\n", " -0.04212694,\n", " -0.042104825,\n", " -0.04209888,\n", " -0.042093154,\n", " -0.042089883,\n", " -0.042081453,\n", " -0.04207755,\n", " -0.042075023,\n", " -0.042070255,\n", " -0.04206203,\n", " -0.04203261,\n", " -0.042021,\n", " -0.04200549,\n", " -0.041988395,\n", " -0.04197783,\n", " -0.041960437,\n", " -0.041948304,\n", " -0.041914593,\n", " -0.0419131,\n", " -0.041904412,\n", " -0.04187726,\n", " -0.041863725,\n", " -0.04185944,\n", " -0.041843303,\n", " -0.04183348,\n", " -0.041828804,\n", " -0.04182038,\n", " -0.04181044,\n", " -0.041806906,\n", " -0.0418068,\n", " -0.041798968,\n", " -0.041780412,\n", " -0.041737307,\n", " -0.041733447,\n", " -0.041707624,\n", " -0.041663554,\n", " -0.04165474,\n", " -0.04163227,\n", " -0.041623946,\n", " -0.041617814,\n", " -0.04159693,\n", " -0.04158911,\n", " -0.04158744,\n", " -0.041571673,\n", " -0.041565932,\n", " -0.04155315,\n", " -0.0415407,\n", " -0.041538842,\n", " -0.04150975,\n", " -0.041508693,\n", " -0.041489497,\n", " -0.041466326,\n", " -0.041453693,\n", " -0.041442122,\n", " -0.041438643,\n", " -0.041398343,\n", " -0.041363813,\n", " -0.041355804,\n", " -0.041341525,\n", " -0.04131737,\n", " -0.04131729,\n", " -0.04130946,\n", " -0.041279666,\n", " -0.041278735,\n", " -0.041273177,\n", " -0.041271444,\n", " -0.041257087,\n", " -0.041226532,\n", " -0.041224703,\n", " -0.041216172,\n", " -0.041200865,\n", " -0.04119469,\n", " -0.041178722,\n", " -0.041171256,\n", " -0.041141618,\n", " -0.041137233,\n", " -0.041122332,\n", " -0.041111287,\n", " -0.04110254,\n", " -0.041098893,\n", " -0.041089896,\n", " -0.0410479,\n", " -0.04103091,\n", " -0.040996548,\n", " -0.040993966,\n", " -0.040982485,\n", " -0.04097263,\n", " -0.04097069,\n", " -0.04095873,\n", " -0.04095243,\n", " -0.040930983,\n", " -0.040928096,\n", " -0.04090707,\n", " -0.040890098,\n", " -0.04086749,\n", " -0.04086712,\n", " -0.040860776,\n", " -0.04085906,\n", " -0.040850945,\n", " -0.040842187,\n", " -0.040829923,\n", " -0.040829547,\n", " -0.04080852,\n", " -0.040808495,\n", " -0.04074643,\n", " -0.040739164,\n", " -0.04071863,\n", " -0.040687434,\n", " -0.04068548,\n", " -0.040667884,\n", " -0.040657688,\n", " -0.040628422,\n", " -0.040617075,\n", " -0.04061317,\n", " -0.04061126,\n", " -0.040607862,\n", " -0.04059256,\n", " -0.04058507,\n", " -0.040580932,\n", " -0.040569004,\n", " -0.04055525,\n", " -0.04055203,\n", " -0.040549316,\n", " -0.04053131,\n", " -0.040499475,\n", " -0.040461246,\n", " -0.040455345,\n", " -0.040450003,\n", " -0.04044356,\n", " -0.040413193,\n", " -0.040390186,\n", " -0.040382456,\n", " -0.040380746,\n", " -0.040378958,\n", " -0.04037631,\n", " -0.040375046,\n", " -0.040372685,\n", " -0.04036844,\n", " -0.04036484,\n", " -0.04035194,\n", " -0.04033075,\n", " -0.040323384,\n", " -0.04031988,\n", " -0.040308688,\n", " -0.04030348,\n", " -0.040300727,\n", " -0.040294178,\n", " -0.04028039,\n", " -0.040274724,\n", " -0.040269054,\n", " -0.04025929,\n", " -0.04025461,\n", " -0.040248025,\n", " -0.040216237,\n", " -0.040211543,\n", " -0.04020971,\n", " -0.040203076,\n", " -0.04020253,\n", " -0.040192343,\n", " -0.04018289,\n", " -0.040178753,\n", " -0.04017255,\n", " -0.040152818,\n", " -0.04013606,\n", " -0.040128343,\n", " -0.040118955,\n", " -0.04011844,\n", " -0.040099576,\n", " -0.040098496,\n", " -0.040093057,\n", " -0.04009245,\n", " -0.0400745,\n", " -0.04005716,\n", " -0.040027454,\n", " -0.040023815,\n", " -0.04001986,\n", " -0.039999843,\n", " -0.0399983,\n", " -0.039996658,\n", " -0.03997859,\n", " -0.039939735,\n", " -0.039932806,\n", " -0.039930675,\n", " -0.039919354,\n", " -0.03989187,\n", " -0.03986964,\n", " -0.03986276,\n", " -0.03986046,\n", " -0.039860174,\n", " -0.039857008,\n", " -0.039854597,\n", " -0.03985412,\n", " -0.039848357,\n", " -0.039830368,\n", " -0.039820015,\n", " -0.039806437,\n", " -0.039800208,\n", " -0.039797377,\n", " -0.03978374,\n", " -0.039754108,\n", " -0.0397404,\n", " -0.03973513,\n", " -0.03973287,\n", " -0.03971767,\n", " -0.03971634,\n", " -0.03971471,\n", " -0.03971223,\n", " -0.03969569,\n", " -0.03968977,\n", " -0.039678454,\n", " -0.039654166,\n", " -0.039653305,\n", " -0.039652485,\n", " -0.03965015,\n", " -0.039650105,\n", " -0.039630424,\n", " -0.039614573,\n", " -0.03960746,\n", " -0.039590262,\n", " -0.039573908,\n", " -0.039573453,\n", " -0.039571956,\n", " -0.03956541,\n", " -0.039560754,\n", " -0.03954187,\n", " -0.03953813,\n", " -0.039510883,\n", " -0.039491232,\n", " -0.03947063,\n", " -0.03946754,\n", " -0.03946645,\n", " -0.039461214,\n", " -0.03945916,\n", " -0.03944843,\n", " -0.0394279,\n", " -0.039424933,\n", " -0.039422847,\n", " -0.039405067,\n", " -0.039401155,\n", " -0.03939946,\n", " -0.03939133,\n", " -0.03939061,\n", " -0.039389208,\n", " -0.039359268,\n", " -0.039358016,\n", " -0.03934589,\n", " -0.039317314,\n", " -0.039306674,\n", " -0.039295472,\n", " -0.039280932,\n", " -0.03926678,\n", " -0.039250206,\n", " -0.039249707,\n", " -0.039247807,\n", " -0.0392252,\n", " -0.03922283,\n", " -0.0392205,\n", " -0.039217185,\n", " -0.03921121,\n", " -0.039175827,\n", " -0.039169528,\n", " -0.039166406,\n", " -0.039160505,\n", " -0.039130494,\n", " -0.03911379,\n", " -0.03910636,\n", " -0.03910269,\n", " -0.039091814,\n", " -0.039091196,\n", " -0.03908061,\n", " -0.039078034,\n", " -0.039046828,\n", " -0.03903909,\n", " -0.039029233,\n", " -0.039022997,\n", " -0.039019015,\n", " -0.03901544,\n", " -0.03901388,\n", " -0.039009936,\n", " -0.0390008,\n", " -0.038983848,\n", " -0.038971476,\n", " -0.038964808,\n", " -0.038943224,\n", " -0.038935296,\n", " -0.038928203,\n", " -0.03892528,\n", " -0.038905498,\n", " -0.03890218,\n", " -0.038895752,\n", " -0.038893953,\n", " -0.03888265,\n", " -0.038879197,\n", " -0.03886448,\n", " -0.038861394,\n", " -0.03885711,\n", " -0.03884432,\n", " -0.038837925,\n", " -0.038835935,\n", " -0.038814254,\n", " -0.03880829,\n", " -0.038793676,\n", " -0.038792446,\n", " -0.038786154,\n", " -0.03877747,\n", " -0.038760792,\n", " -0.038756423,\n", " -0.038731635,\n", " -0.038724408,\n", " -0.038711507,\n", " -0.03871026,\n", " -0.038707197,\n", " -0.038699858,\n", " -0.03868439,\n", " -0.038663074,\n", " -0.03866076,\n", " -0.03866032,\n", " -0.038649388,\n", " -0.038641576,\n", " -0.038626697,\n", " -0.038623907,\n", " -0.03860693,\n", " -0.038592145,\n", " -0.03857992,\n", " -0.038579322,\n", " -0.038549554,\n", " -0.03853352,\n", " -0.038531546,\n", " -0.038527906,\n", " -0.038496196,\n", " -0.03847768,\n", " -0.038472086,\n", " -0.038463213,\n", " -0.03845877,\n", " -0.038453802,\n", " -0.038452182,\n", " -0.03844671,\n", " -0.038446613,\n", " -0.03844204,\n", " -0.038439907,\n", " -0.03843607,\n", " -0.03843216,\n", " -0.03843193,\n", " -0.03842004,\n", " -0.03840303,\n", " -0.03839405,\n", " -0.038363297,\n", " -0.038333718,\n", " -0.03832848,\n", " -0.038321547,\n", " -0.038316768,\n", " -0.03831483,\n", " -0.038301855,\n", " -0.038295593,\n", " -0.038289748,\n", " ...]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "i" ] }, { "cell_type": "code", "execution_count": null, "id": "63433e37", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 8, "id": "2b0a01f2", "metadata": {}, "outputs": [], "source": [ "image_data_w814_fireball = image_data_w814_fireball + 0.10425752" ] }, { "cell_type": "code", "execution_count": null, "id": "339937a2", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "2f8c6e1f", "metadata": {}, "source": [ "## data_manip" ] }, { "cell_type": "code", "execution_count": 9, "id": "3338ced7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#display plot of data using a log scale\n", "plt.imshow(image_data_w814_fireball, cmap= \"Blues\", interpolation = \"nearest\", norm=LogNorm())\n", "plt.colorbar()" ] }, { "cell_type": "code", "execution_count": 10, "id": "5b2b14ea", "metadata": {}, "outputs": [], "source": [ "#query zeropoint\n", "date = '2007-05-08'\n", "detector = 'WFC'" ] }, { "cell_type": "code", "execution_count": 11, "id": "cb7efe65", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:acszpt.Query:Checking inputs...\n", "INFO:acszpt.Query:Submitting request to https://acszeropoints.stsci.edu/results_single/?date1=2007-05-08&detector=WFC&WFC_filter=F814W\n", "INFO:acszpt.Query:Parsing the response and formatting the results...\n" ] } ], "source": [ "q814 = acszpt.Query(date=date, detector=detector, filt = \"F814W\") \n", "filter_zpt814 = q814.fetch()" ] }, { "cell_type": "code", "execution_count": 12, "id": "3694c6c2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "FILTER PHOTPLAM PHOTFLAM STmag VEGAmag ABmag \n", " Angstrom erg / (Angstrom cm2 s) mag(ST) mag mag(AB)\n", "------ -------- ---------------------- ------- ------- -------\n", " F814W 8045.3 7.137e-20 26.766 25.503 25.93\n" ] } ], "source": [ "print(filter_zpt814)" ] }, { "cell_type": "code", "execution_count": 13, "id": "e963c2e1", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ ":1: RuntimeWarning: divide by zero encountered in log10\n", " m_ab_w_814_fireball = (-2.5 * np.log10(image_data_w814_fireball)) + filter_zpt814['ABmag'][0].value\n", ":1: RuntimeWarning: invalid value encountered in log10\n", " m_ab_w_814_fireball = (-2.5 * np.log10(image_data_w814_fireball)) + filter_zpt814['ABmag'][0].value\n" ] } ], "source": [ "m_ab_w_814_fireball = (-2.5 * np.log10(image_data_w814_fireball)) + filter_zpt814['ABmag'][0].value" ] }, { "cell_type": "code", "execution_count": 14, "id": "ee971ae8", "metadata": {}, "outputs": [], "source": [ "m_ab_w_814_fireball_array = np.where(m_ab_w_814_fireball == np.inf, 0, m_ab_w_814_fireball)\n", "#m_ab_w_814_fireball_array = np.nan_to_num(m_ab_w_814_fireball)" ] }, { "cell_type": "code", "execution_count": 15, "id": "b36361c1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "28.582123" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m_ab_w_814_fireball_array[1,1]" ] }, { "cell_type": "code", "execution_count": 18, "id": "a7b2ec68", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_814_fireball_array, interpolation = \"nearest\")\n", "plt.clim(21,32)# for wide\n", "#plt.clim(25.5,30.5)#for core\n", "plt.colorbar()" ] }, { "cell_type": "code", "execution_count": 18, "id": "e2f90ee2", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from astropy.io import fits\n", "from astropy.utils.data import get_pkg_data_filename\n", "from astropy.convolution import Gaussian2DKernel\n", "from scipy.signal import convolve as scipy_convolve\n", "from astropy.convolution import convolve\n", "from astropy.convolution import convolve_fft\n", "\n", "kernel = Gaussian2DKernel(x_stddev=3)\n", "w814_conv = convolve_fft(m_ab_w_814_fireball_array, kernel, allow_huge=True)" ] }, { "cell_type": "code", "execution_count": 19, "id": "12c3dc16", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_814_fireball_array, vmin=26, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.contour(w814_conv, levels = [27.5, 27.6, 27.7, 27.8, 27.9,28, 28.1, 28.2, 28.3], cmap = \"Reds\", linewidths =3)\n", "\n", "plt.colorbar()\n", "\n" ] }, { "cell_type": "code", "execution_count": 20, "id": "a7bc0bc4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_814_fireball_array, vmin=26, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n" ] }, { "cell_type": "code", "execution_count": 21, "id": "3118f7ce", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3200.0, 4200.0)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(w814_conv, vmin=27, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n", "plt.xlim(2600, 3600)\n", "plt.ylim(3200, 4200)" ] }, { "cell_type": "code", "execution_count": null, "id": "51f68f32", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "d4e0c701", "metadata": {}, "source": [ "## apeture data" ] }, { "cell_type": "code", "execution_count": 22, "id": "a9015890", "metadata": {}, "outputs": [], "source": [ "from photutils.aperture import CircularAperture\n", "from photutils.aperture import aperture_photometry" ] }, { "cell_type": "code", "execution_count": 23, "id": "bbeebbb5", "metadata": {}, "outputs": [], "source": [ "#3-arcsecond apurture\n", "#hubble is at 0.04 arcseconds per pixel\n", "#so the diameter of the apuruture needs to be 75 pixels wide, or 38 pixel radius\n", "#test double radius becuase of drizzle\n", "#3066, 3652" ] }, { "cell_type": "code", "execution_count": 24, "id": "f65113a0", "metadata": {}, "outputs": [], "source": [ "positions = [(3066., 3652.)]\n", "aperture = CircularAperture(positions, r=75.)\n", "\n", "background_positions = [(3000., 2036.)]\n", "bacground_apeture = CircularAperture(background_positions, r=2.)" ] }, { "cell_type": "code", "execution_count": 25, "id": "3c7ebe74", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_814_fireball_array, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.clim(21,32)# for wide\n", "#plt.clim(25.5,30.5)#for core\n", "plt.colorbar()\n", "aperture.plot(color='white', lw=2,label='Photometry aperture')\n", "bacground_apeture.plot(color='red', lw=2,label='Background aperture')" ] }, { "cell_type": "code", "execution_count": 26, "id": "ad62e165", "metadata": {}, "outputs": [], "source": [ "phot_table = aperture_photometry(image_data_w814_fireball, aperture)\n", "background_table = aperture_photometry(image_data_w814_fireball, bacground_apeture)" ] }, { "cell_type": "code", "execution_count": 27, "id": "68073b41", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " id xcenter ycenter aperture_sum \n", " pix pix \n", "--- ------- ------- -----------------\n", " 1 3066.0 3652.0 3627.120375520468\n", "------------------------------------\n", " id xcenter ycenter aperture_sum \n", " pix pix \n", "--- ------- ------- ------------------\n", " 1 3000.0 2036.0 1.4181913630688272\n" ] } ], "source": [ "print(phot_table)\n", "print(\"------------------------------------\")\n", "print(background_table)" ] }, { "cell_type": "code", "execution_count": 28, "id": "0c7a7838", "metadata": {}, "outputs": [], "source": [ "bkg_mean = background_table['aperture_sum'] / bacground_apeture.area" ] }, { "cell_type": "code", "execution_count": 29, "id": "fb7c6308", "metadata": {}, "outputs": [], "source": [ "phot = phot_table['aperture_sum']" ] }, { "cell_type": "code", "execution_count": 30, "id": "d80ca7fd", "metadata": {}, "outputs": [], "source": [ "phot2 = 120607.24243693583 - 2*54791.63149645273" ] }, { "cell_type": "code", "execution_count": 31, "id": "9ff4db64", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
3627.120375520468
" ], "text/plain": [ "\n", "3627.120375520468" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "phot" ] }, { "cell_type": "code", "execution_count": 32, "id": "56058d5b", "metadata": {}, "outputs": [], "source": [ "ap_mag1 = (-2.5 * np.log10(phot/0.972 )) + filter_zpt814['ABmag'][0].value" ] }, { "cell_type": "code", "execution_count": 33, "id": "08b0ec2a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
17.00026073975777
" ], "text/plain": [ "\n", "17.00026073975777" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ap_mag1" ] }, { "cell_type": "code", "execution_count": 34, "id": "1d963aad", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
0.2602607397577721
" ], "text/plain": [ "\n", "0.2602607397577721" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ap_mag1 - 16.740" ] }, { "cell_type": "markdown", "id": "fec80e77", "metadata": {}, "source": [ "# w475 data" ] }, { "cell_type": "markdown", "id": "59010f95", "metadata": {}, "source": [ "## import data" ] }, { "cell_type": "code", "execution_count": 2, "id": "4b8c8646", "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'fits' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mimage_data_w475_fireball\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mheader_w475_fireball\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfits\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgetdata\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F475W_ivm_drz_cl_ver2.fits\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mheader\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[1;31mNameError\u001b[0m: name 'fits' is not defined" ] } ], "source": [ "image_data_w475_fireball, header_w475_fireball = fits.getdata(\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F475W_ivm_drz_cl_ver2.fits\", header=True)" ] }, { "cell_type": "code", "execution_count": 36, "id": "abd9e364", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING: VerifyWarning: Verification reported errors: [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Verification reported errors:\n", "WARNING: VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '1.8088039e-19 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard. [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '1.8088039e-19 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard.\n", "WARNING: VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", " [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", "\n" ] }, { "data": { "text/plain": [ "XTENSION= 'IMAGE ' / Image extension \n", "BITPIX = -32 / Bits per pixel \n", "NAXIS = 2 / Number of axes \n", "NAXIS1 = 4225 / Axis length \n", "NAXIS2 = 4300 / Axis length \n", "PCOUNT = 0 / No 'random' parameters \n", "GCOUNT = 1 / Only one group \n", "ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator \n", "EXTNAME = 'SCI ' / Extension name \n", "EXTVER = 1 / Extension version \n", "IRAF-TLM= '21:03:35 (27/04/2009)' / Time of last modification \n", "INHERIT = T / Inherits global header \n", "DATE = '2009-02-16T16:34:03' / Date FITS file was generated \n", "EXPNAME = 'j9ty75q0q ' / exposure identifier \n", "BUNIT = 'ELECTRONS' / brightness units \n", " \n", " / WFC CCD CHIP IDENTIFICATION \n", " \n", "CCDCHIP = '-999 ' / CCD chip (1 or 2) \n", " \n", " / World Coordinate System and Related Parameters \n", " \n", "WCSAXES = 2 / number of World Coordinate System axes \n", "CRPIX1 = 2.115074520E+03 / x-coordinate of reference pixel \n", "CRPIX2 = 2.154059514E+03 / y-coordinate of reference pixel \n", "CRVAL1 = 1.947033233E+02 / first axis value at reference pixel \n", "CRVAL2 = 2.777017191E+01 / second axis value at reference pixel \n", "CTYPE1 = 'RA---TAN' / the coordinate type for the first axis \n", "CTYPE2 = 'DEC--TAN' / the coordinate type for the second axis \n", "CD1_1 = -2.411211755E-06 / partial of first axis coordinate w.r.t. x \n", "CD1_2 = -1.367452457E-05 / partial of first axis coordinate w.r.t. y \n", "CD2_1 = -1.366811852E-05 / partial of second axis coordinate w.r.t. x \n", "CD2_2 = 2.415297744E-06 / partial of second axis coordinate w.r.t. y \n", "LTV1 = 0.0000000E+00 / offset in X to subsection start \n", "LTV2 = 0.0000000E+00 / offset in Y to subsection start \n", "LTM1_1 = 1.0 / reciprocal of sampling rate in X \n", "LTM2_2 = 1.0 / reciprocal of sampling rate in Y \n", "ORIENTAT= -79.99807502774281 / position angle of image y axis (deg. e of n) \n", "RA_APER = 1.946999401583E+02 / RA of aperture reference position \n", "DEC_APER= 2.777020287706E+01 / Declination of aperture reference position \n", "PA_APER = -82.4473 / Position Angle of reference aperture center (de\n", "VAFACTOR= 1.000088651747E+00 / velocity aberration plate scale factor \n", " \n", " / READOUT DEFINITION PARAMETERS \n", " \n", "CENTERA1= 2073 / subarray axis1 center pt in unbinned dect. pix \n", "CENTERA2= 1035 / subarray axis2 center pt in unbinned dect. pix \n", "SIZAXIS1= 4096 / subarray axis1 size in unbinned detector pixels\n", "SIZAXIS2= 2048 / subarray axis2 size in unbinned detector pixels\n", "BINAXIS1= 1 / axis1 data bin size in unbinned detector pixels\n", "BINAXIS2= 1 / axis2 data bin size in unbinned detector pixels\n", " \n", " / PHOTOMETRY KEYWORDS \n", " \n", "PHOTMODE= 'ACS WFC1 F475W' / observation con \n", "PHOTFLAM= 1.8088039E-19 / inverse sensitivity, ergs/cm2/Ang/electron \n", "PHOTZPT = -21.1 / ST magnitude zero point \n", "PHOTPLAM= 4744.3511 / Pivot wavelength (Angstroms) \n", "PHOTBW = 420.10358 / RMS bandwidth of filter plus detector \n", " \n", " / REPEATED EXPOSURES INFO \n", " \n", "NCOMBINE= 4 / number of image sets combined during CR rejecti\n", " \n", " / DATA PACKET INFORMATION \n", " \n", "FILLCNT = 0 / number of segments containing fill \n", "ERRCNT = 0 / number of segments containing errors \n", "PODPSFF = F / podps fill present (T/F) \n", "STDCFFF = F / ST DDF fill present (T/F) \n", "STDCFFP = 'x5569 ' / ST DDF fill pattern (hex) \n", " \n", " / ON-BOARD COMPRESSION INFORMATION \n", " \n", "WFCMPRSD= F / was WFC data compressed? (T/F) \n", "CBLKSIZ = 0 / size of compression block in 2-byte words \n", "LOSTPIX = 0 / #pixels lost due to buffer overflow \n", "COMPTYP = 'None ' / compression type performed (Partial/Full/None) \n", " \n", " / IMAGE STATISTICS AND DATA QUALITY FLAGS \n", " \n", "NGOODPIX= 7975537 / number of good pixels \n", "SDQFLAGS= 31743 / serious data quality flags \n", "GOODMIN = -1.2186662E+02 / minimum value of good pixels \n", "GOODMAX = 6.8332023E+04 / maximum value of good pixels \n", "GOODMEAN= 3.9127682E+01 / mean value of good pixels \n", "SOFTERRS= 0 / number of soft error pixels (DQF=1) \n", "SNRMIN = -1.4934797E+00 / minimum signal to noise of good pixels \n", "SNRMAX = 2.1743515E+02 / maximum signal to noise of good pixels \n", "SNRMEAN = 3.7036467E+00 / mean value of signal to noise of good pixels \n", "MEANDARK= 1.2351134E+00 / average of the dark values subtracted \n", "MEANBLEV= 2.2628274E+03 / average of all bias levels subtracted \n", "MEANFLSH= 0.000000 / Mean number of counts in post flash exposure \n", "OCRVAL1 = 194.7197271993 / first axis value at reference pixel \n", "OCRVAL2 = 27.76780442544 / second axis value at reference pixel \n", "OCRPIX2 = 1024.0 / y-coordinate of reference pixel \n", "OCRPIX1 = 2100.0 / x-coordinate of reference pixel \n", "ONAXIS2 = 2048 / Axis length \n", "ONAXIS1 = 4096 / Axis length \n", "OCD2_2 = 1.89501E-06 / partial of second axis coordinate w.r.t. y \n", "OCD2_1 = -1.35713E-05 / partial of second axis coordinate w.r.t. x \n", "OORIENTA= -82.20950553990684 / position angle of image y axis (deg. e of n) \n", "OCTYPE1 = 'RA---TAN' / the coordinate type for the first axis \n", "OCD1_1 = -2.81298E-06 / partial of first axis coordinate w.r.t. x \n", "OCD1_2 = -1.3851E-05 / partial of first axis coordinate w.r.t. y \n", "OCTYPE2 = 'DEC--TAN' / the coordinate type for the second axis \n", "WCSCDATE= '11:54:43 (08/05/2007)' / Time WCS keywords were copied. \n", "A_0_2 = 2.180457517069783E-06 \n", "B_0_2 = -7.226655545658089E-06 \n", "A_1_1 = -5.222514963837963E-06 \n", "B_1_1 = 6.20296055678446E-06 \n", "A_2_0 = 8.548429207571172E-06 \n", "B_2_0 = -1.755167042308172E-06 \n", "A_0_3 = 8.093547472472023E-12 \n", "B_0_3 = -4.248874746839625E-10 \n", "A_1_2 = -5.290302873070522E-10 \n", "B_1_2 = -7.609874274712453E-11 \n", "A_2_1 = -4.48213769718937E-11 \n", "B_2_1 = -5.124408227309817E-10 \n", "A_3_0 = -4.675534626156557E-10 \n", "B_3_0 = 8.481458557906735E-11 \n", "A_0_4 = -8.366525969129326E-17 \n", "B_0_4 = -2.16620764808346E-14 \n", "A_1_3 = -1.510858498104292E-14 \n", "B_1_3 = -1.568676487647782E-14 \n", "A_2_2 = 3.612527456690228E-14 \n", "B_2_2 = -2.619420785383476E-14 \n", "A_3_1 = 1.035025481920331E-14 \n", "B_3_1 = -2.691564209102086E-15 \n", "A_4_0 = 2.326429654819605E-14 \n", "B_4_0 = -1.570128695664044E-14 \n", "A_ORDER = 4 \n", "B_ORDER = 4 \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "HISTORY Astrometric solution by SCAMP version 1.4.0-MP (2008-01-27) \n", "COMMENT (c) Emmanuel BERTIN \n", "EQUINOX = 2.000000000E+03 / Mean equinox \n", "RADECSYS= 'ICRS ' / Astrometric system \n", "CUNIT1 = 'deg ' / Axis unit \n", "CUNIT2 = 'deg ' / Axis unit \n", "XCRVAL1 = 1.947033233E+02 / Previous World Coordinate on this axis \n", "XCRVAL2 = 2.777017191E+01 / Previous World Coordinate on this axis \n", "XCRPIX1 = 2.112500000E+03 / Previous World Coordinate on this axis \n", "XCRPIX2 = 2.150000000E+03 / Previous World Coordinate on this axis \n", "XCD1_1 = -2.412403172E-06 / Previous Linear Projection Matrix \n", "XCD1_2 = -1.367873035E-05 / Previous Linear Projection Matrix \n", "XCD2_1 = -1.367873035E-05 / Previous Linear Projection Matrix \n", "XCD2_2 = 2.412403172E-06 / Previous Linear Projection Matrix \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " " ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "header_w475_fireball" ] }, { "cell_type": "code", "execution_count": 1, "id": "6d2d5874", "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'image_data_w475_fireball' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mimage_data_w475_fireball\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[1;31mNameError\u001b[0m: name 'image_data_w475_fireball' is not defined" ] } ], "source": [ "image_data_w475_fireball" ] }, { "cell_type": "code", "execution_count": 38, "id": "8830e384", "metadata": {}, "outputs": [], "source": [ "f = []\n", "for char in image_data_w475_fireball:\n", " f.append(min(char))" ] }, { "cell_type": "code", "execution_count": 39, "id": "14c8afa9", "metadata": {}, "outputs": [], "source": [ "f.sort()" ] }, { "cell_type": "code", "execution_count": 40, "id": "38489559", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[-0.32320216,\n", " -0.2763098,\n", " -0.18330823,\n", " -0.103662595,\n", " -0.083295144,\n", " -0.0784939,\n", " -0.07518539,\n", " -0.060384504,\n", " -0.059961643,\n", " -0.05487316,\n", " -0.047836646,\n", " -0.046713635,\n", " -0.04652455,\n", " -0.04611057,\n", " -0.042741094,\n", " -0.04263821,\n", " -0.041788753,\n", " -0.04145403,\n", " -0.040932953,\n", " -0.039374545,\n", " -0.039028678,\n", " -0.038636725,\n", " -0.038360145,\n", " -0.038253624,\n", " -0.03794669,\n", " -0.037888497,\n", " -0.03780338,\n", " -0.03703286,\n", " -0.036774132,\n", " -0.036660492,\n", " -0.03642335,\n", " -0.036369707,\n", " -0.03636368,\n", " -0.036191884,\n", " -0.036025796,\n", " -0.036012035,\n", " -0.035678875,\n", " -0.03515897,\n", " -0.034877535,\n", " -0.034497153,\n", " -0.034460302,\n", " -0.034365192,\n", " -0.03413995,\n", " -0.033833727,\n", " -0.033700947,\n", " -0.033578232,\n", " -0.033539504,\n", " -0.033535138,\n", " -0.033488665,\n", " -0.03347847,\n", " -0.033475272,\n", " -0.033394057,\n", " -0.033372477,\n", " -0.033251543,\n", " -0.03318545,\n", " -0.033170693,\n", " -0.03312423,\n", " -0.03305354,\n", " -0.033004858,\n", " -0.032877788,\n", " -0.032724254,\n", " -0.032690827,\n", " -0.03268378,\n", " -0.032627873,\n", " -0.03253979,\n", " -0.032523427,\n", " -0.032500632,\n", " -0.03248298,\n", " -0.032435358,\n", " -0.032433685,\n", " -0.032402873,\n", " -0.032299586,\n", " -0.03227271,\n", " -0.0322536,\n", " -0.03214128,\n", " -0.032108948,\n", " -0.03205323,\n", " -0.031999525,\n", " -0.031996068,\n", " -0.031900667,\n", " -0.031802073,\n", " -0.031776905,\n", " -0.03177616,\n", " -0.03175462,\n", " -0.031750426,\n", " -0.03172243,\n", " -0.031648282,\n", " -0.031606484,\n", " -0.031597897,\n", " -0.0315488,\n", " -0.031545993,\n", " -0.03153889,\n", " -0.031480778,\n", " -0.031427957,\n", " -0.03139396,\n", " -0.031383123,\n", " -0.031379603,\n", " -0.031348478,\n", " -0.031292416,\n", " -0.031254344,\n", " -0.031245638,\n", " -0.031199683,\n", " -0.031053625,\n", " -0.031047821,\n", " -0.030963307,\n", " -0.030959379,\n", " -0.030950448,\n", " -0.030925829,\n", " -0.030848494,\n", " -0.030748071,\n", " -0.030717425,\n", " -0.030673206,\n", " -0.03063248,\n", " -0.030606445,\n", " -0.030599562,\n", " -0.03048257,\n", " -0.030325128,\n", " -0.030190889,\n", " -0.030093761,\n", " -0.030047879,\n", " -0.029960874,\n", " -0.029849214,\n", " -0.029836476,\n", " -0.029759184,\n", " -0.02973048,\n", " -0.02972424,\n", " -0.029723305,\n", " -0.029693948,\n", " -0.029692953,\n", " -0.029647335,\n", " -0.029610824,\n", " -0.029588902,\n", " -0.029588128,\n", " -0.029577306,\n", " -0.029560754,\n", " -0.029530274,\n", " -0.029496241,\n", " -0.02942467,\n", " -0.029361308,\n", " -0.029272879,\n", " -0.029243404,\n", " -0.029227506,\n", " -0.029219704,\n", " -0.029165998,\n", " -0.02908335,\n", " -0.029075556,\n", " -0.028956434,\n", " -0.028922109,\n", " -0.02890981,\n", " -0.028856222,\n", " -0.028789409,\n", " -0.028760929,\n", " -0.028748045,\n", " -0.028680634,\n", " -0.028663512,\n", " -0.028629694,\n", " -0.028565928,\n", " -0.028551755,\n", " -0.028535688,\n", " -0.02851352,\n", " -0.028491054,\n", " -0.028473934,\n", " -0.02846949,\n", " -0.028462915,\n", " -0.028452665,\n", " -0.028448585,\n", " -0.028296351,\n", " -0.028275814,\n", " -0.0282248,\n", " -0.028223895,\n", " -0.028216373,\n", " -0.028168852,\n", " -0.02816281,\n", " -0.028161775,\n", " -0.02813307,\n", " -0.028121281,\n", " -0.028120818,\n", " -0.028056607,\n", " -0.02802765,\n", " -0.028001683,\n", " -0.02797835,\n", " -0.027849685,\n", " -0.027844049,\n", " -0.027823914,\n", " -0.02782154,\n", " -0.027818264,\n", " -0.027788103,\n", " -0.027776742,\n", " -0.027768737,\n", " -0.02775359,\n", " -0.027707985,\n", " -0.02768876,\n", " -0.027688097,\n", " -0.027665524,\n", " -0.027654713,\n", " -0.027650267,\n", " -0.027639367,\n", " -0.02763863,\n", " -0.027594212,\n", " -0.027589696,\n", " -0.027584145,\n", " -0.027579073,\n", " -0.02757773,\n", " -0.027528659,\n", " -0.027508194,\n", " -0.02750541,\n", " -0.027500762,\n", " -0.027493114,\n", " -0.027475184,\n", " -0.027454004,\n", " -0.027451279,\n", " -0.027449002,\n", " -0.027446898,\n", " -0.027425803,\n", " -0.027388733,\n", " -0.02736165,\n", " -0.027320515,\n", " -0.027315114,\n", " -0.027302798,\n", " -0.0272943,\n", " -0.027252842,\n", " -0.027252156,\n", " -0.027247185,\n", " -0.02722687,\n", " -0.027193196,\n", " -0.027185481,\n", " -0.027171008,\n", " -0.02715195,\n", " -0.027147595,\n", " -0.027141625,\n", " -0.02713392,\n", " -0.027121663,\n", " -0.027062923,\n", " -0.027052555,\n", " -0.027045732,\n", " -0.0270433,\n", " -0.027037993,\n", " -0.027024377,\n", " -0.027017457,\n", " -0.027009822,\n", " -0.027008073,\n", " -0.026955573,\n", " -0.026937086,\n", " -0.026915962,\n", " -0.026914699,\n", " -0.02689828,\n", " -0.026861137,\n", " -0.026852068,\n", " -0.026838405,\n", " -0.026836248,\n", " -0.026834432,\n", " -0.02681578,\n", " -0.026784312,\n", " -0.02677749,\n", " -0.026776528,\n", " -0.026762983,\n", " -0.02676211,\n", " -0.026717627,\n", " -0.026711566,\n", " -0.026693668,\n", " -0.026679011,\n", " -0.026668446,\n", " -0.02666826,\n", " -0.02666765,\n", " -0.026657311,\n", " -0.026617853,\n", " -0.026582154,\n", " -0.026556594,\n", " -0.026556531,\n", " -0.026533142,\n", " -0.02648567,\n", " -0.026452737,\n", " -0.02643665,\n", " -0.026418561,\n", " -0.02641047,\n", " -0.026402356,\n", " -0.02637648,\n", " -0.026374254,\n", " -0.02637081,\n", " -0.026341617,\n", " -0.026328664,\n", " -0.026290694,\n", " -0.02628718,\n", " -0.026286671,\n", " -0.026277035,\n", " -0.026263308,\n", " -0.026246091,\n", " -0.026227213,\n", " -0.026173739,\n", " -0.026170114,\n", " -0.02616478,\n", " -0.02611601,\n", " -0.026113562,\n", " -0.026101086,\n", " -0.026093403,\n", " -0.026091633,\n", " -0.02608789,\n", " -0.02608044,\n", " -0.026063567,\n", " -0.026061991,\n", " -0.02606153,\n", " -0.026056636,\n", " -0.026017115,\n", " -0.026001438,\n", " -0.025960464,\n", " -0.025945729,\n", " -0.025933342,\n", " -0.025928762,\n", " -0.025911799,\n", " -0.025907991,\n", " -0.02589962,\n", " -0.025888568,\n", " -0.02588616,\n", " -0.0258757,\n", " -0.025874086,\n", " -0.025858942,\n", " -0.0258363,\n", " -0.025812969,\n", " -0.02579641,\n", " -0.025785515,\n", " -0.025775656,\n", " -0.025752211,\n", " -0.0257393,\n", " -0.025724204,\n", " -0.025711622,\n", " -0.025687348,\n", " -0.025642147,\n", " -0.025632773,\n", " -0.0256166,\n", " -0.025614792,\n", " -0.025599169,\n", " -0.025596576,\n", " -0.025595596,\n", " -0.025546277,\n", " -0.02554431,\n", " -0.025536472,\n", " -0.0255342,\n", " -0.02552444,\n", " -0.025520634,\n", " -0.025498144,\n", " -0.025492782,\n", " -0.025478348,\n", " -0.025477624,\n", " -0.025472015,\n", " -0.025467534,\n", " -0.025451055,\n", " -0.02544911,\n", " -0.025437055,\n", " -0.025420044,\n", " -0.025419235,\n", " -0.025380319,\n", " -0.025352895,\n", " -0.025350105,\n", " -0.025349973,\n", " -0.025331266,\n", " -0.025323287,\n", " -0.025322212,\n", " -0.025297204,\n", " -0.025284428,\n", " -0.02528391,\n", " -0.025268683,\n", " -0.025265988,\n", " -0.025236966,\n", " -0.02522906,\n", " -0.02522559,\n", " -0.025221452,\n", " -0.025216114,\n", " -0.025188824,\n", " -0.025187409,\n", " -0.025182491,\n", " -0.02515999,\n", " -0.025142804,\n", " -0.025131674,\n", " -0.025123589,\n", " -0.025121931,\n", " -0.02512101,\n", " -0.025117727,\n", " -0.025110716,\n", " -0.025095077,\n", " -0.02509337,\n", " -0.025083536,\n", " -0.025079574,\n", " -0.025067536,\n", " -0.025057064,\n", " -0.025037391,\n", " -0.025023364,\n", " -0.02501243,\n", " -0.025011098,\n", " -0.025009567,\n", " -0.024991028,\n", " -0.02498627,\n", " -0.024981825,\n", " -0.024974963,\n", " -0.024967771,\n", " -0.024962805,\n", " -0.024955237,\n", " -0.024953842,\n", " -0.02494932,\n", " -0.024938727,\n", " -0.024903802,\n", " -0.024903001,\n", " -0.024884861,\n", " -0.024874225,\n", " -0.024873476,\n", " -0.024869498,\n", " -0.02486056,\n", " -0.02485361,\n", " -0.024843566,\n", " -0.024826683,\n", " -0.024813294,\n", " -0.024811868,\n", " -0.024799304,\n", " -0.024798868,\n", " -0.02479188,\n", " -0.024789117,\n", " -0.024782436,\n", " -0.024758084,\n", " -0.024756113,\n", " -0.024750303,\n", " -0.02474306,\n", " -0.024737755,\n", " -0.024723541,\n", " -0.024704987,\n", " -0.024688289,\n", " -0.024670335,\n", " -0.024660826,\n", " -0.024659399,\n", " -0.024653282,\n", " -0.024647797,\n", " -0.024617387,\n", " -0.024609309,\n", " -0.024602968,\n", " -0.024584074,\n", " -0.024577798,\n", " -0.024565902,\n", " -0.024565652,\n", " -0.0245528,\n", " -0.024542294,\n", " -0.024536809,\n", " -0.02453345,\n", " -0.024531908,\n", " -0.024522569,\n", " -0.02451397,\n", " -0.024481133,\n", " -0.02447793,\n", " -0.024471838,\n", " -0.02446623,\n", " -0.024460044,\n", " -0.024448587,\n", " -0.024431461,\n", " -0.0244279,\n", " -0.024402019,\n", " -0.024391355,\n", " -0.02438526,\n", " -0.024383256,\n", " -0.024379538,\n", " -0.024375012,\n", " -0.02436606,\n", " -0.024320772,\n", " -0.024320235,\n", " -0.024318272,\n", " -0.02430801,\n", " -0.024306532,\n", " -0.024304517,\n", " -0.02430413,\n", " -0.024302948,\n", " -0.02428863,\n", " -0.0242799,\n", " -0.024271348,\n", " -0.024263328,\n", " -0.02425828,\n", " -0.024237094,\n", " -0.024214476,\n", " -0.024208056,\n", " -0.024182787,\n", " -0.024178192,\n", " -0.024166605,\n", " -0.024157476,\n", " -0.024153082,\n", " -0.02415308,\n", " -0.024134038,\n", " -0.024130184,\n", " -0.024125371,\n", " -0.024124214,\n", " -0.024123944,\n", " -0.024115736,\n", " -0.024089646,\n", " -0.024086658,\n", " -0.02408134,\n", " -0.024071334,\n", " -0.02407078,\n", " -0.024069343,\n", " -0.024066592,\n", " -0.024046186,\n", " -0.02402948,\n", " -0.02402906,\n", " -0.02401696,\n", " -0.024016898,\n", " -0.024008512,\n", " -0.02400732,\n", " -0.024003183,\n", " -0.023986612,\n", " -0.023977099,\n", " -0.02397493,\n", " -0.023969607,\n", " -0.023952793,\n", " -0.023946565,\n", " -0.023941578,\n", " -0.023941167,\n", " -0.023935864,\n", " -0.023932166,\n", " -0.0239318,\n", " -0.023925686,\n", " -0.02391311,\n", " -0.02390955,\n", " -0.023901086,\n", " -0.023878876,\n", " -0.023863742,\n", " -0.02385541,\n", " -0.023842733,\n", " -0.023837933,\n", " -0.023829963,\n", " -0.023826117,\n", " -0.023825925,\n", " -0.02380997,\n", " -0.023740012,\n", " -0.023736924,\n", " -0.023735454,\n", " -0.02373143,\n", " -0.023731329,\n", " -0.023726137,\n", " -0.023718057,\n", " -0.023702815,\n", " -0.023682628,\n", " -0.023678482,\n", " -0.023676643,\n", " -0.023674479,\n", " -0.023663685,\n", " -0.023650322,\n", " -0.023645123,\n", " -0.023638852,\n", " -0.023629816,\n", " -0.023623956,\n", " -0.023608098,\n", " -0.023602763,\n", " -0.023595149,\n", " -0.02358776,\n", " -0.023585062,\n", " -0.023582695,\n", " -0.023577323,\n", " -0.023577003,\n", " -0.023570564,\n", " -0.023561891,\n", " -0.023552718,\n", " -0.023552634,\n", " -0.02354521,\n", " -0.023535369,\n", " -0.023517275,\n", " -0.023504516,\n", " -0.023492265,\n", " -0.023490325,\n", " -0.0234901,\n", " -0.023458008,\n", " -0.023440124,\n", " -0.023435611,\n", " -0.023434265,\n", " -0.023431564,\n", " -0.02342259,\n", " -0.023415385,\n", " -0.023397883,\n", " -0.0233889,\n", " -0.023370251,\n", " -0.02336997,\n", " -0.023369944,\n", " -0.023352385,\n", " -0.023340663,\n", " -0.023323283,\n", " -0.023320718,\n", " -0.023294277,\n", " -0.023277557,\n", " -0.023277078,\n", " -0.023259727,\n", " -0.023258308,\n", " -0.02325479,\n", " -0.023253534,\n", " -0.023239397,\n", " -0.023234077,\n", " -0.023203645,\n", " -0.023199232,\n", " -0.023191357,\n", " -0.023190815,\n", " -0.023189701,\n", " -0.023170082,\n", " -0.023168147,\n", " -0.023157107,\n", " -0.023156015,\n", " -0.023151949,\n", " -0.023126071,\n", " -0.023123058,\n", " -0.023118904,\n", " -0.023110503,\n", " -0.0230973,\n", " -0.023095954,\n", " -0.023095531,\n", " -0.02307643,\n", " -0.023075882,\n", " -0.023061512,\n", " -0.023058303,\n", " -0.023055732,\n", " -0.023047466,\n", " -0.023043504,\n", " -0.023041679,\n", " -0.023039782,\n", " -0.023015259,\n", " -0.023006871,\n", " -0.022996755,\n", " -0.022992563,\n", " -0.022977045,\n", " -0.022970218,\n", " -0.022964649,\n", " -0.022950096,\n", " -0.0229413,\n", " -0.022929454,\n", " -0.022920132,\n", " -0.022919128,\n", " -0.02291468,\n", " -0.02290529,\n", " -0.022898255,\n", " -0.022897633,\n", " -0.022895928,\n", " -0.022895487,\n", " -0.022885842,\n", " -0.022880178,\n", " -0.022866247,\n", " -0.022844337,\n", " -0.022840887,\n", " -0.022829724,\n", " -0.022826852,\n", " -0.022821866,\n", " -0.022815872,\n", " -0.022814482,\n", " -0.02281307,\n", " -0.022784159,\n", " -0.022776417,\n", " -0.022774203,\n", " -0.022774091,\n", " -0.022768391,\n", " -0.022763764,\n", " -0.022758875,\n", " -0.022750877,\n", " -0.022747068,\n", " -0.022738911,\n", " -0.022737773,\n", " -0.022724582,\n", " -0.022718702,\n", " -0.022716044,\n", " -0.022716038,\n", " -0.022714613,\n", " -0.022694971,\n", " -0.022685505,\n", " -0.022684697,\n", " -0.022678783,\n", " -0.022676025,\n", " -0.022671286,\n", " -0.02262075,\n", " -0.022613492,\n", " -0.022593059,\n", " -0.022580802,\n", " -0.022549147,\n", " -0.022545606,\n", " -0.022544036,\n", " -0.022543125,\n", " -0.022518773,\n", " -0.022518659,\n", " -0.02251415,\n", " -0.022503244,\n", " -0.02246489,\n", " -0.022461241,\n", " -0.022455657,\n", " -0.022454744,\n", " -0.022453167,\n", " -0.022450002,\n", " -0.02244458,\n", " -0.022438478,\n", " -0.022437448,\n", " -0.022435382,\n", " -0.022428866,\n", " -0.022425232,\n", " -0.022419987,\n", " -0.022413962,\n", " -0.022413908,\n", " -0.022412604,\n", " -0.022408487,\n", " -0.022404945,\n", " -0.022398533,\n", " -0.02238036,\n", " -0.022380196,\n", " -0.022372628,\n", " -0.022372177,\n", " -0.022367006,\n", " -0.022361608,\n", " -0.02235691,\n", " -0.022350293,\n", " -0.022339545,\n", " -0.022329733,\n", " -0.022324279,\n", " -0.02231149,\n", " -0.022307595,\n", " -0.022304196,\n", " -0.022303658,\n", " -0.022302682,\n", " -0.022281231,\n", " -0.022275683,\n", " -0.022260657,\n", " -0.022252206,\n", " -0.022251336,\n", " -0.022226958,\n", " -0.022224912,\n", " -0.02221914,\n", " -0.02221032,\n", " -0.022207938,\n", " -0.022205072,\n", " -0.022201952,\n", " -0.022197692,\n", " -0.022183657,\n", " -0.022175023,\n", " -0.022167683,\n", " -0.022164712,\n", " -0.02216306,\n", " -0.022153715,\n", " -0.022153115,\n", " -0.02211807,\n", " -0.02210941,\n", " -0.022105526,\n", " -0.022080569,\n", " -0.022078063,\n", " -0.022070112,\n", " -0.022065336,\n", " -0.022061585,\n", " -0.022051664,\n", " -0.022035444,\n", " -0.022034585,\n", " -0.02202917,\n", " -0.022027373,\n", " -0.02202453,\n", " -0.022020658,\n", " -0.022016883,\n", " -0.022014793,\n", " -0.022009566,\n", " -0.022005236,\n", " -0.021999707,\n", " -0.021997398,\n", " -0.021996181,\n", " -0.02196786,\n", " -0.02196736,\n", " -0.021966767,\n", " -0.021963418,\n", " -0.021962462,\n", " -0.021960078,\n", " -0.021947792,\n", " -0.02194394,\n", " -0.021933379,\n", " -0.021927042,\n", " -0.021924715,\n", " -0.021924477,\n", " -0.021922313,\n", " -0.021917893,\n", " -0.021917542,\n", " -0.02190964,\n", " -0.02189882,\n", " -0.021897402,\n", " -0.021883126,\n", " -0.021872351,\n", " -0.021867376,\n", " -0.021857692,\n", " -0.02184618,\n", " -0.02184476,\n", " -0.021843717,\n", " -0.021831088,\n", " -0.021828203,\n", " -0.021825073,\n", " -0.021825034,\n", " -0.021819094,\n", " -0.021813445,\n", " -0.021807283,\n", " -0.021796683,\n", " -0.02178728,\n", " -0.021786911,\n", " -0.021783339,\n", " -0.021782123,\n", " -0.021769803,\n", " -0.021768892,\n", " -0.021768365,\n", " -0.021761319,\n", " -0.021761296,\n", " -0.021755004,\n", " -0.021743624,\n", " -0.02174267,\n", " -0.021739444,\n", " -0.021736093,\n", " -0.021735508,\n", " -0.021734849,\n", " -0.021730416,\n", " -0.021727992,\n", " -0.021727292,\n", " -0.021725789,\n", " -0.021723991,\n", " -0.0217117,\n", " -0.02170376,\n", " -0.021702291,\n", " -0.021700641,\n", " -0.021698847,\n", " -0.021694949,\n", " -0.021694364,\n", " -0.021668172,\n", " -0.021663465,\n", " -0.021654455,\n", " -0.021653986,\n", " -0.021653928,\n", " -0.021647729,\n", " -0.021647109,\n", " -0.021633677,\n", " -0.02162561,\n", " -0.021620754,\n", " -0.021617696,\n", " -0.021605767,\n", " -0.021605162,\n", " -0.021593418,\n", " -0.021593316,\n", " -0.021591581,\n", " -0.021571785,\n", " -0.021569777,\n", " -0.021565156,\n", " -0.02155702,\n", " -0.021553056,\n", " -0.021545045,\n", " -0.02154137,\n", " -0.021529367,\n", " -0.0215181,\n", " -0.021515394,\n", " -0.021506606,\n", " -0.021502404,\n", " -0.021501891,\n", " -0.02149722,\n", " -0.0214858,\n", " -0.021483019,\n", " -0.021476816,\n", " -0.021471336,\n", " -0.021465423,\n", " -0.021465398,\n", " -0.021464081,\n", " -0.021451069,\n", " -0.021449005,\n", " -0.02143927,\n", " -0.021433815,\n", " -0.021428106,\n", " -0.021424355,\n", " -0.021412442,\n", " -0.021410603,\n", " -0.021409858,\n", " -0.021401478,\n", " -0.021397106,\n", " -0.021392435,\n", " -0.021391299,\n", " -0.021389207,\n", " -0.021385767,\n", " -0.021367595,\n", " -0.021355798,\n", " -0.021352978,\n", " -0.021350859,\n", " -0.021341417,\n", " -0.021335298,\n", " -0.02131975,\n", " -0.02131808,\n", " -0.021304935,\n", " -0.021302944,\n", " -0.021301975,\n", " -0.02129654,\n", " -0.021293327,\n", " -0.02128906,\n", " -0.021289041,\n", " -0.021285174,\n", " -0.021284442,\n", " -0.021275336,\n", " -0.021275045,\n", " -0.021271039,\n", " -0.021266589,\n", " -0.021264901,\n", " -0.021259038,\n", " -0.021258226,\n", " -0.02125778,\n", " -0.021248402,\n", " -0.021245537,\n", " -0.02124374,\n", " -0.021229006,\n", " -0.021227796,\n", " -0.021219151,\n", " -0.021217313,\n", " -0.02120496,\n", " -0.021203397,\n", " -0.02119735,\n", " -0.021194357,\n", " -0.021182504,\n", " -0.021168344,\n", " -0.021166166,\n", " -0.021155283,\n", " -0.021152437,\n", " -0.021147639,\n", " -0.021145144,\n", " -0.021141429,\n", " -0.021140663,\n", " -0.021134047,\n", " -0.021132633,\n", " -0.021129716,\n", " -0.021119732,\n", " -0.021119533,\n", " -0.0211109,\n", " -0.021109965,\n", " -0.021105938,\n", " -0.021105755,\n", " -0.021101495,\n", " -0.021075975,\n", " -0.021073246,\n", " -0.021072526,\n", " -0.021070596,\n", " -0.021068798,\n", " -0.021068403,\n", " -0.021067897,\n", " -0.021066613,\n", " -0.021065261,\n", " -0.02106405,\n", " -0.021060709,\n", " -0.021057243,\n", " -0.021055153,\n", " -0.021054922,\n", " -0.021053119,\n", " -0.021049835,\n", " -0.021045264,\n", " -0.021044288,\n", " -0.02104314,\n", " -0.021042915,\n", " -0.021038456,\n", " -0.021038368,\n", " -0.021033099,\n", " -0.021032594,\n", " -0.021031313,\n", " -0.021031039,\n", " -0.021021305,\n", " -0.02101348,\n", " -0.021010034,\n", " -0.02099671,\n", " -0.020992668,\n", " -0.020977166,\n", " -0.020975323,\n", " -0.020971516,\n", " -0.020964606,\n", " -0.020957112,\n", " -0.02095299,\n", " -0.020950776,\n", " -0.020943886,\n", " -0.020942913,\n", " -0.020936966,\n", " -0.020930124,\n", " -0.020929221,\n", " -0.0209264,\n", " -0.020922648,\n", " -0.020922456,\n", " -0.020913912,\n", " -0.020901944,\n", " -0.020900756,\n", " -0.020900002,\n", " -0.020879112,\n", " -0.02086017,\n", " -0.020860095,\n", " -0.020859536,\n", " -0.020852963,\n", " -0.02085191,\n", " -0.020843329,\n", " -0.020841941,\n", " -0.020837331,\n", " -0.020833705,\n", " -0.02082754,\n", " -0.02082426,\n", " -0.020822546,\n", " -0.020822482,\n", " -0.020822087,\n", " -0.020815926,\n", " -0.020813752,\n", " -0.020809503,\n", " -0.020799017,\n", " -0.020796517,\n", " -0.020784676,\n", " -0.02078453,\n", " -0.020782862,\n", " -0.020770295,\n", " -0.020768642,\n", " -0.020767191,\n", " -0.020765368,\n", " -0.02074254,\n", " -0.020742109,\n", " ...]" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f" ] }, { "cell_type": "code", "execution_count": 41, "id": "a5646166", "metadata": {}, "outputs": [], "source": [ "image_data_w475_fireball = image_data_w475_fireball+ 0.083295144" ] }, { "cell_type": "markdown", "id": "a64e9175", "metadata": {}, "source": [ "## Data_manip" ] }, { "cell_type": "code", "execution_count": 42, "id": "6bea2670", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#display plot of data using a log scale\n", "plt.imshow(image_data_w475_fireball, cmap= \"Blues\", interpolation = \"nearest\", norm=LogNorm())\n", "plt.colorbar()" ] }, { "cell_type": "code", "execution_count": 43, "id": "a219183b", "metadata": {}, "outputs": [], "source": [ "#query zeropoint\n", "date = '2007-05-08'\n", "detector = 'WFC'" ] }, { "cell_type": "code", "execution_count": 44, "id": "a1423fa6", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:acszpt.Query:Checking inputs...\n", "INFO:acszpt.Query:Submitting request to https://acszeropoints.stsci.edu/results_single/?date1=2007-05-08&detector=WFC&WFC_filter=F475W\n", "INFO:acszpt.Query:Parsing the response and formatting the results...\n" ] } ], "source": [ "q475 = acszpt.Query(date=date, detector=detector, filt = \"F475W\") \n", "filter_zpt475 = q475.fetch()" ] }, { "cell_type": "code", "execution_count": 45, "id": "ec4c62ea", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "FILTER PHOTPLAM PHOTFLAM STmag VEGAmag ABmag \n", " Angstrom erg / (Angstrom cm2 s) mag(ST) mag mag(AB)\n", "------ -------- ---------------------- ------- ------- -------\n", " F475W 4747.5 1.852e-19 25.731 26.133 26.041\n" ] } ], "source": [ "print(filter_zpt475)" ] }, { "cell_type": "code", "execution_count": 46, "id": "46d5c75c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ ":1: RuntimeWarning: divide by zero encountered in log10\n", " m_ab_w_475_fireball = (-2.5 * np.log10(image_data_w475_fireball)) + filter_zpt475['ABmag'][0].value\n", ":1: RuntimeWarning: invalid value encountered in log10\n", " m_ab_w_475_fireball = (-2.5 * np.log10(image_data_w475_fireball)) + filter_zpt475['ABmag'][0].value\n" ] } ], "source": [ "m_ab_w_475_fireball = (-2.5 * np.log10(image_data_w475_fireball)) + filter_zpt475['ABmag'][0].value" ] }, { "cell_type": "code", "execution_count": 47, "id": "dc292605", "metadata": {}, "outputs": [], "source": [ "m_ab_w_475_fireball_array = np.where(m_ab_w_475_fireball == np.inf, 0, m_ab_w_475_fireball)" ] }, { "cell_type": "code", "execution_count": 48, "id": "93c45e1e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 48, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_475_fireball_array, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.clim(26.5,29)# for wide\n", "#plt.clim(25.5,30.5)#for core\n", "plt.colorbar()" ] }, { "cell_type": "code", "execution_count": 49, "id": "ec02f276", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from astropy.io import fits\n", "from astropy.utils.data import get_pkg_data_filename\n", "from astropy.convolution import Gaussian2DKernel\n", "from scipy.signal import convolve as scipy_convolve\n", "from astropy.convolution import convolve\n", "from astropy.convolution import convolve_fft\n", "\n", "kernel = Gaussian2DKernel(x_stddev=3)\n", "w475_conv = convolve_fft(m_ab_w_475_fireball_array, kernel, allow_huge=True)" ] }, { "cell_type": "code", "execution_count": 50, "id": "4d86221f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_475_fireball_array, vmin=27.0, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.contour(w475_conv, levels = [27.0, 27.4, 27.6, 27.8, 28, 28.2, 28.4], linewidths =3)\n", "\n", "plt.colorbar()\n", "\n" ] }, { "cell_type": "code", "execution_count": 51, "id": "31e53b74", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 51, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_475_fireball_array, vmin=26.5, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n" ] }, { "cell_type": "code", "execution_count": 52, "id": "223d4346", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(w475_conv, vmin=26.5, vmax=29, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n" ] }, { "cell_type": "markdown", "id": "d5d318e1", "metadata": {}, "source": [ "## Aputure photometry" ] }, { "cell_type": "code", "execution_count": 53, "id": "f008f138", "metadata": {}, "outputs": [], "source": [ "from photutils.aperture import CircularAperture\n", "from photutils.aperture import aperture_photometry" ] }, { "cell_type": "code", "execution_count": 54, "id": "f262def9", "metadata": {}, "outputs": [], "source": [ "positions = [(3066., 3652.)]\n", "aperture = CircularAperture(positions, r=75.)\n", "\n", "background_positions = [(3000., 2036.)]\n", "bacground_apeture = CircularAperture(background_positions, r=2.)" ] }, { "cell_type": "code", "execution_count": 55, "id": "5655530f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 55, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(m_ab_w_475_fireball_array, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.clim(21,32)# for wide\n", "#plt.clim(25.5,30.5)#for core\n", "plt.colorbar()\n", "aperture.plot(color='white', lw=2,label='Photometry aperture')\n", "bacground_apeture.plot(color='red', lw=2,label='Background aperture')" ] }, { "cell_type": "code", "execution_count": 56, "id": "a1de1239", "metadata": {}, "outputs": [], "source": [ "phot_table2 = aperture_photometry(image_data_w475_fireball, aperture)\n", "background_table2 = aperture_photometry(image_data_w475_fireball, bacground_apeture)" ] }, { "cell_type": "code", "execution_count": 57, "id": "282dc30e", "metadata": {}, "outputs": [], "source": [ "bkg_mean2 = background_table2['aperture_sum'] / bacground_apeture.area" ] }, { "cell_type": "code", "execution_count": null, "id": "a48fceca", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 58, "id": "0c61e90c", "metadata": {}, "outputs": [], "source": [ "phot2 = phot_table2['aperture_sum']" ] }, { "cell_type": "code", "execution_count": 59, "id": "ad208b09", "metadata": {}, "outputs": [], "source": [ "ap_mag2 = (-2.5 * np.log10(phot2/0.979 )) + filter_zpt475['ABmag'][0].value" ] }, { "cell_type": "code", "execution_count": 60, "id": "0aaa5bb2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
17.390431128235456
" ], "text/plain": [ "\n", "17.390431128235456" ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ap_mag2" ] }, { "cell_type": "code", "execution_count": 61, "id": "5f68c3c0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
0.25743112823545644
" ], "text/plain": [ "\n", "0.25743112823545644" ] }, "execution_count": 61, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ap_mag2 - 17.133" ] }, { "cell_type": "markdown", "id": "c1959359", "metadata": {}, "source": [ "# subtraction" ] }, { "cell_type": "code", "execution_count": 62, "id": "0ea00a77", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
0.39017038847768504
" ], "text/plain": [ "\n", "0.39017038847768504" ] }, "execution_count": 62, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ap_mag2- ap_mag1" ] }, { "cell_type": "code", "execution_count": 63, "id": "8ffa7bbe", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<Column name='aperture_sum' dtype='float64' length=1>\n", "\n", "\n", "
-0.0028296115223149787
" ], "text/plain": [ "\n", "-0.0028296115223149787" ] }, "execution_count": 63, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(ap_mag2- ap_mag1) - 0.3930" ] }, { "cell_type": "code", "execution_count": 64, "id": "a7ef6f2d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.3930000000000007" ] }, "execution_count": 64, "metadata": {}, "output_type": "execute_result" } ], "source": [ "17.133- 16.740" ] }, { "cell_type": "code", "execution_count": 65, "id": "fc624e61", "metadata": {}, "outputs": [], "source": [ "subtractmap = m_ab_w_475_fireball_array - m_ab_w_814_fireball_array\n", "astropy_conv = w475_conv - w814_conv" ] }, { "cell_type": "code", "execution_count": 66, "id": "6fbf9649", "metadata": {}, "outputs": [], "source": [ "subctract_pos = [(3066., 3652.)]\n", "subtract_ap = CircularAperture(subctract_pos, r=75.)" ] }, { "cell_type": "code", "execution_count": 67, "id": "37fe3257", "metadata": {}, "outputs": [], "source": [ "subtract_sum = aperture_photometry(subtractmap, subtract_ap)" ] }, { "cell_type": "code", "execution_count": 68, "id": "ffffcfb0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "QTable length=1\n", "\n", "\n", "\n", "\n", "\n", "
idxcenterycenteraperture_sum
pixpix
int32float64float64float64
13066.03652.06849.207414790636
" ], "text/plain": [ "\n", " id xcenter ycenter aperture_sum \n", " pix pix \n", "int32 float64 float64 float64 \n", "----- ------- ------- -----------------\n", " 1 3066.0 3652.0 6849.207414790636" ] }, "execution_count": 68, "metadata": {}, "output_type": "execute_result" } ], "source": [ "subtract_sum" ] }, { "cell_type": "code", "execution_count": 69, "id": "231761b2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.38758585469354356" ] }, "execution_count": 69, "metadata": {}, "output_type": "execute_result" } ], "source": [ "6849.207414790636/subtract_ap.area" ] }, { "cell_type": "markdown", "id": "39c02c4d", "metadata": {}, "source": [ "## Subtraction map" ] }, { "cell_type": "code", "execution_count": 81, "id": "c2202156", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 81, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from astropy.io import fits\n", "from astropy.utils.data import get_pkg_data_filename\n", "from astropy.convolution import Gaussian2DKernel\n", "from scipy.signal import convolve as scipy_convolve\n", "from astropy.convolution import convolve\n", "from astropy.convolution import convolve_fft\n", "\n", "\n", "\n", "\n", "\n", "#plt.imshow(astropy_conv, vmin=-.1, vmax=1.1, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.imshow(subtractmap, vmin=-.1, vmax=1.1, cmap= \"Blues\", interpolation = \"nearest\")\n", "#plt.contour(astropy_conv, levels = [.1, .15, .2, .25, .3, .35, .4, .45, .55], cmap= \"Reds\", linewidths =3)\n", "plt.colorbar()\n", "\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 82, "id": "bea1421f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3200.0, 4200.0)" ] }, "execution_count": 82, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#close\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from astropy.io import fits\n", "from astropy.utils.data import get_pkg_data_filename\n", "from astropy.convolution import Gaussian2DKernel\n", "from scipy.signal import convolve as scipy_convolve\n", "from astropy.convolution import convolve\n", "from astropy.convolution import convolve_fft\n", "\n", "\n", "\n", "\n", "\n", "#plt.imshow(astropy_conv, vmin=-.1, vmax=1.1, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.imshow(subtractmap, vmin=-.1, vmax=1.1, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.contour(astropy_conv, levels = [.26, .27, .28, .29, .3, .31, .32, .33, .34, .35], cmap = \"gist_stern\", linewidths =3)\n", "plt.colorbar()\n", "plt.xlim(2600, 3600)\n", "plt.ylim(3200, 4200)" ] }, { "cell_type": "code", "execution_count": 72, "id": "fa99adc2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3200.0, 4200.0)" ] }, "execution_count": 72, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(astropy_conv, vmin=-.1, vmax=1.1, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n", "plt.xlim(2600, 3600)\n", "plt.ylim(3200, 4200)" ] }, { "cell_type": "code", "execution_count": 73, "id": "6b573885", "metadata": {}, "outputs": [], "source": [ "from PIL import Image\n", "vertical_img = np.flipud(subtractmap)" ] }, { "cell_type": "code", "execution_count": 74, "id": "f893be7f", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 74, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(subtractmap, vmin=-.6, vmax=.5, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()\n" ] }, { "cell_type": "code", "execution_count": 75, "id": "b43676b2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 75, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plt.imshow(vertical_img, vmin=-.6, vmax=.5, cmap= \"Blues\", interpolation = \"nearest\")\n", "plt.colorbar()" ] }, { "cell_type": "code", "execution_count": 76, "id": "ec1869d8", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "from astropy.io import fits\n", "from astropy.utils.data import get_pkg_data_filename\n", "from astropy.convolution import Gaussian2DKernel\n", "from scipy.signal import convolve as scipy_convolve\n", "from astropy.convolution import convolve\n", "from astropy.convolution import convolve_fft\n", "\n", "kernel = Gaussian2DKernel(x_stddev=2)\n", "astropy_conv = convolve(subtractmap, kernel)" ] }, { "cell_type": "markdown", "id": "23900510", "metadata": {}, "source": [ "## APLPY" ] }, { "cell_type": "code", "execution_count": 1, "id": "a2eb94eb", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING: AstropyDeprecationWarning: block_reduce was moved to the astropy.nddata.blocks module. Please update your import statement. [astropy.nddata.utils]\n" ] } ], "source": [ "import aplpy" ] }, { "cell_type": "code", "execution_count": 3, "id": "a046ac45", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING: hdu=0 does not contain any data, using hdu=1 instead [aplpy.core]\n", "WARNING: VerifyWarning: Verification reported errors: [astropy.io.fits.verify]\n", "WARNING: VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '1.8088039e-19 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard. [astropy.io.fits.verify]\n", "WARNING: VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", " [astropy.io.fits.verify]\n", "WARNING: FITSFixedWarning: RADECSYS= 'ICRS ' / Astrometric system \n", "the RADECSYS keyword is deprecated, use RADESYSa. [astropy.wcs.wcs]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "INFO: \n", " Inconsistent SIP distortion information is present in the FITS header and the WCS object:\n", " SIP coefficients were detected, but CTYPE is missing a \"-SIP\" suffix.\n", " astropy.wcs is using the SIP distortion coefficients,\n", " therefore the coordinates calculated here might be incorrect.\n", "\n", " If you do not want to apply the SIP distortion coefficients,\n", " please remove the SIP coefficients from the FITS header or the\n", " WCS object. As an example, if the image is already distortion-corrected\n", " (e.g., drizzled) then distortion components should not apply and the SIP\n", " coefficients should be removed.\n", "\n", " While the SIP distortion coefficients are being applied here, if that was indeed the intent,\n", " for consistency please append \"-SIP\" to the CTYPE in the FITS header or the WCS object.\n", "\n", " [astropy.wcs.wcs]\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnMAAAIXCAYAAAD31dhCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAcSElEQVR4nO3deZBlV30f8O8PjRhJ7NiABcaoBMhCAiS2gIMRxhIOduFQ5RhhCBAgLA6bIU4cgrHBJg4QlhjKAUPALDFgbMQSCIsIGBmnWAqEhBDCQBKxI4RhRtgoEkK//NFvzKM1Pd0zPT13Tt/Pp0rVr899797faZ7Et86955zq7gAAMKZrTV0AAAAHTpgDABiYMDeBqqqpa4C1+H5yOPF9ZEqjfP+EuWm8sqpeN3URsIY/qqo3TV0ELLygqt46dRHM1rOr6n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8nObe7r1purKpjkjwmyZO6+4ok6e5LuvvP17nusUm+tfSZb3X31xbHPpTkjEWABPgRwhwwa1V1RJLTk/z3peYHJXlTkjcmefAaH71nkk/spf02Sb7U3Zdt4PL3S/K2xeuzk9yyqj5XVS+tqnvveVN3X53kC0lO2cA5gZkR5oC5Orqqzkvyt0lunOR9SVJVd0tyaXd/Mcn7k9y5qm60l88fm+TSA7z2X1bVN7NyK/UNSdLdf5fkLkkeuzjvm6rqEUuf+WaSmx/g9YBtTJgD5ury7j41ya2SXDs/fGbuwUlOrKqLk/zvJNdP8s/29vkkR+2l/QtJfqqqrreXY3vcZ3HdC5P8/p7G7v5Bd3+wu5+Z5ImrrnvU4poAP0KYA2atu3cneXKSf1NVO5M8MMkdu/u47j4uyQOy91utF2Xllurq830vyauSvKSqrp0kVXVsVT101fsuT/KUJA+vqhtX1U+vmrF6apIvLv1+QlbCH8CPEOaA2evuTyY5P8mZSb7a3V9dOvxXSU6qqmNXfezdSU5b45TPyMqt0s9U1aez8lzcNW7JdvfXs/Jc3hOSXDfJa6vqM1X1qSQnJXlWklTVzbIykvj1A+ogsK1Vd09dA8CQquqtSX6ruz+/xdd5apLLuvtVW3kdYExG5gAO3NOyMhFiq+1K8tpDcB1gQEbmAAAGZmQOAGBgwhwAwMCEOQCAgQlzAAADE+YAAAb2/wGR0QY3E21vXgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "fig = aplpy.FITSFigure(\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F475W_ivm_drz_cl_ver2.fits\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "75699f2e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "INFO: Auto-setting vmin to -2.567e-02 [aplpy.core]\n", "INFO: Auto-setting vmax to 1.215e-01 [aplpy.core]\n" ] } ], "source": [ "fig.show_grayscale()" ] }, { "cell_type": "code", "execution_count": 80, "id": "b175c046", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "WARNING: hdu=0 does not contain any data, using hdu=1 instead [aplpy.core]\n", "WARNING:astropy:hdu=0 does not contain any data, using hdu=1 instead\n", "WARNING: VerifyWarning: Verification reported errors: [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Verification reported errors:\n", "WARNING: VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '1.8088039e-19 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard. [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Card 'PHOTFLAM' is not FITS standard (invalid value string: '1.8088039e-19 / inverse sensitivity, ergs/cm2/Ang/electron'). Fixed 'PHOTFLAM' card to meet the FITS standard.\n", "WARNING: VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", " [astropy.io.fits.verify]\n", "WARNING:astropy:VerifyWarning: Note: astropy.io.fits uses zero-based indexing.\n", "\n", "INFO:astropy:\n", " Inconsistent SIP distortion information is present in the FITS header and the WCS object:\n", " SIP coefficients were detected, but CTYPE is missing a \"-SIP\" suffix.\n", " astropy.wcs is using the SIP distortion coefficients,\n", " therefore the coordinates calculated here might be incorrect.\n", "\n", " If you do not want to apply the SIP distortion coefficients,\n", " please remove the SIP coefficients from the FITS header or the\n", " WCS object. As an example, if the image is already distortion-corrected\n", " (e.g., drizzled) then distortion components should not apply and the SIP\n", " coefficients should be removed.\n", "\n", " While the SIP distortion coefficients are being applied here, if that was indeed the intent,\n", " for consistency please append \"-SIP\" to the CTYPE in the FITS header or the WCS object.\n", "\n", " \n", "WARNING: FITSFixedWarning: RADECSYS= 'ICRS ' / Astrometric system \n", "the RADECSYS keyword is deprecated, use RADESYSa. [astropy.wcs.wcs]\n", "WARNING:astropy:FITSFixedWarning: RADECSYS= 'ICRS ' / Astrometric system \n", "the RADECSYS keyword is deprecated, use RADESYSa.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "INFO: \n", " Inconsistent SIP distortion information is present in the FITS header and the WCS object:\n", " SIP coefficients were detected, but CTYPE is missing a \"-SIP\" suffix.\n", " astropy.wcs is using the SIP distortion coefficients,\n", " therefore the coordinates calculated here might be incorrect.\n", "\n", " If you do not want to apply the SIP distortion coefficients,\n", " please remove the SIP coefficients from the FITS header or the\n", " WCS object. As an example, if the image is already distortion-corrected\n", " (e.g., drizzled) then distortion components should not apply and the SIP\n", " coefficients should be removed.\n", "\n", " While the SIP distortion coefficients are being applied here, if that was indeed the intent,\n", " for consistency please append \"-SIP\" to the CTYPE in the FITS header or the WCS object.\n", "\n", " [astropy.wcs.wcs]\n" ] } ], "source": [ "fig.show_contour(\"C:/Users/willi/Desktop/Hubble Data/candidates/2/h_v75_F475W_ivm_drz_cl_ver2.fits\", colors='red')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 5 }