Studying the spiral galaxy IC 4538

Downloading this notebook example

This notebook can be downloaded in this link

Loading libraries

[1]:
import stat_lib as SL

command to unable the cell scroll

[2]:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) { return false; }

Enviroment

See the full explication of the parameters of simbad_thumbnail() here

[3]:
SL.simbad_thumbnail('ic4538','simbad', size_image_phy=100,
                    limtvel=500)

Basic information:
-------------------
Galaxy Name: ic4538
MAIN_ID: IC 4538
RA  = 230.29824362937
DEC = -23.65840755355
Rad Vel = 2870.0 km/s
Distance = 41.0 Mpc


This fits_images/ic4538_simbad_100kpc.fits file is already downloaded...

------------------------

Simbad query
============

region(circle, 230.298244d -23.658408d, 503s) & radvel  < 3370.0 & radvel > 2370.0 & Otypes = G & maintype != GlobCluster_Candidate

Output
======

MAIN_ID     RA_d        DEC_d     ...     RVZ_BIBCODE     SCRIPT_NUMBER_ID
            deg          deg      ...
------- ------------ ------------ ... ------------------- ----------------
IC 4538 230.29824363 -23.65840755 ... 2002LEDA.........0P                0


Projected Distances
------------------------
Proyected distance ic4538 and (0) IC 4538 (2870.0 km/s) is = 0.0\,kpc (0.0$\arcsec$)
../_images/notebooks_fitting_8_1.png

Moddeling the sky, masking stars and computing segmentation maps

See the full explication of the parameters of ex_phot_mod_decals() here

[4]:
 SL.ex_phot_mod_decals('IC4538', 'simbad',
                       size_image_phy=35, band='g', snr = 2,
                       area_min=1, deblend='off', area_min_deblend=20,
                       sky_box=[50, 50], sky_method='masking_sources',
                       mask_stars='yes', fwhm=3.0, threshold=10, roundlo=-0.5,
                       roundhi=0.5, sharplo=0.2, aper_stars=5, aper_center=10,
                       flag_area_th=3, flag_SN_th=3, perc_SN_flag=50,
                       segmap=None, petro_extent_cas=1.5, eta=0.2,
                       run_auto='no', show_plot='yes', plot_model='yes',
                       outputfile='properties.dat', dr=10, simbad_cone=2/3600.)

Basic information:
-------------------
Galaxy Name: IC4538
MAIN_ID: IC 4538
mag_B: 12.83
RA  = 230.29824363
DEC = -23.65840755
Rad Vel = 2870.0 km/s
Distance = 41.0 Mpc
arc_kpc = 0.1988
image size in pix: 1304.3
Minimum detection area in the Field1.0 kcp^2 = 347 pix
Minimum deblending detection area 20.0 kcp^2 = 6943 pix


Loading/Downloading the images and tables
---------------------------------------------

The image fits_images/IC4538_g_35kpc.fits already exist

The image images/fig_IC4538_35kpc.jpeg already exist
../_images/notebooks_fitting_11_1.png


Calculating the image background
------------------------------------------
Masking the sources over the image...
../_images/notebooks_fitting_11_3.png


Median Sky subtraction for the whole cutout
------------------------------------------
mean_sky_:seg = 0.00
median_sky_g = 0.00
std_sky_g = 0.00


Estimating the 2D sky _background by using a sky box of 50x50 pixel
------------------------------------------
Background map
--------------
../_images/notebooks_fitting_11_5.png
Saving fits_images/IC4538_g_35kpc_sky.fits...
Saving fits_images/IC4538_g_35kpc_sky_sub.fits...


Detecting foregroud stars
--------------------------------
Number of stars found  124
../_images/notebooks_fitting_11_7.png
Saving fits_images/IC4538_g_35kpc_mask_stars.fits

Computing the segmentacion map
--------------------------------

Area in pixel of the detection objects:
[   389    348   2116 193208    350   1218    864    425   1080   1553
    356    533    568    872    418    420    358    482   2014    677
    373    799    532   2670    595    410]

ID of the detection objects:
[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 24 25]
../_images/notebooks_fitting_11_9.png
Saving images/fig_IC4538_g_35kpc_segm.png
Saving fits_images/IC4538_g_35kpc_segm.fits

Running phot_mod_decals
----------------

SL.phot_mod_decals('IC4538', tab_gal, size_image_phy=35,   band='g', snr=2, dr=10, simbad_cone=0.0005555555555555556, user_order=[1,2], user_list=["A","B"], area_min = 1, deblend ='off',  area_min_deblend = 20, sky_box=[50, 50], sky_method='masking_sources', std_sky=0.0031930652912706137, nsigma=2, npixels=5, dilate_size=11, flag_area_th=3, flag_SN_th=3, perc_SN_flag = 50, segmap='fits_images/IC4538_g_35kpc_segm.fits', petro_extent_cas=1.5, eta=0.2,  mask_stars='fits_images/IC4538_g_35kpc_mask_stars.fits', fwhm=3.0, threshold=10, roundlo=-0.5, roundhi=0.5, sharplo=0.2, aper_stars=5, aper_center=10, sizet=20, run_auto='no', show_plot='yes', plot_model='yes', outputfile='properties.dat')

Running computing the non-parametric parameters and Sersic model

[5]:
 SL.ex_phot_mod_decals('IC4538', 'simbad',
                       size_image_phy=35, band='g', snr = 2,
                       area_min=1, deblend='off', area_min_deblend=20,
                       sky_box=[50, 50], sky_method='masking_sources',
                       mask_stars='yes', fwhm=3.0, threshold=10, roundlo=-0.5,
                       roundhi=0.5, sharplo=0.2, aper_stars=5, aper_center=10,
                       flag_area_th=3, flag_SN_th=3, perc_SN_flag=50,
                       segmap=None, petro_extent_cas=1.5, eta=0.2,
                       run_auto='yes', show_plot='yes', plot_model='yes',
                       sizet=10,
                       outputfile='properties.dat', dr=10, simbad_cone=2/3600.)

Basic information:
-------------------
Galaxy Name: IC4538
MAIN_ID: IC 4538
mag_B: 12.83
RA  = 230.29824363
DEC = -23.65840755
Rad Vel = 2870.0 km/s
Distance = 41.0 Mpc
arc_kpc = 0.1988
image size in pix: 1304.3
Minimum detection area in the Field1.0 kcp^2 = 347 pix
Minimum deblending detection area 20.0 kcp^2 = 6943 pix


Loading/Downloading the images and tables
---------------------------------------------

The image fits_images/IC4538_g_35kpc.fits already exist

The image images/fig_IC4538_35kpc.jpeg already exist
../_images/notebooks_fitting_13_1.png


Calculating the image background
------------------------------------------
Masking the sources over the image...
../_images/notebooks_fitting_13_3.png


Median Sky subtraction for the whole cutout
------------------------------------------
mean_sky_:seg = 0.00
median_sky_g = 0.00
std_sky_g = 0.00


Estimating the 2D sky _background by using a sky box of 50x50 pixel
------------------------------------------
Background map
--------------
../_images/notebooks_fitting_13_5.png
Saving fits_images/IC4538_g_35kpc_sky.fits...
Saving fits_images/IC4538_g_35kpc_sky_sub.fits...


Detecting foregroud stars
--------------------------------
Number of stars found  124
../_images/notebooks_fitting_13_7.png
Saving fits_images/IC4538_g_35kpc_mask_stars.fits

Computing the segmentacion map
--------------------------------

Area in pixel of the detection objects:
[   389    348   2116 193208    350   1218    864    425   1080   1553
    356    533    568    872    418    420    358    482   2014    677
    373    799    532   2670    595    410]

ID of the detection objects:
[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 24 25]
../_images/notebooks_fitting_13_9.png
Saving images/fig_IC4538_g_35kpc_segm.png
Saving fits_images/IC4538_g_35kpc_segm.fits

Running phot_mod_decals
----------------

SL.phot_mod_decals('IC4538', tab_gal, size_image_phy=35,   band='g', snr=2, dr=10, simbad_cone=0.0005555555555555556, user_order=[3], user_list=['g'], area_min = 1, deblend ='off',  area_min_deblend = 20, sky_box=[50, 50], sky_method='masking_sources', std_sky=0.0031930652912706137, nsigma=2, npixels=5, dilate_size=11, flag_area_th=3, flag_SN_th=3, perc_SN_flag = 50, segmap='fits_images/IC4538_g_35kpc_segm.fits', petro_extent_cas=1.5, eta=0.2,  mask_stars='fits_images/IC4538_g_35kpc_mask_stars.fits', fwhm=3.0, threshold=10, roundlo=-0.5, roundhi=0.5, sharplo=0.2, aper_stars=5, aper_center=10, sizet=10, run_auto='yes', show_plot='yes', plot_model='yes', outputfile='properties.dat')

Basic information:
-------------------
Galaxy Name: IC4538
RA  = 230.29824363
DEC = -23.65840755
Rad Vel = 2870.0 km/s
Distance = 41.0 Mpc
arc_kpc = 0.1988


ZP and mean PSF of the Field
--------------------------------

Making a query to download the psf value

SELECT ra, dec, psfsize_g
                FROM ls_dr10.tractor
                WHERE Q3C_RADIAL_QUERY(ra,dec,230.29824363,-23.65840755,0.0005555555555555556)

result of query...
            ra        dec  psfsize_g
0  230.298238 -23.658407    1.95792
1  230.298292 -23.658373    1.95792

ZP:22.5
Median fwhm in the field : 2.0

Saving fits_images/IC4538_g_35kpc_mask.fits...

Checking the flags of area and S/N
------------------------------------

the psf area is: 41.3 pix

The segmentation '3' has an area of 193208.0 pix
Its area is  4678.1 times larger than psf area

*The galaxy percentile 50th  sinal-to-noise is: 10.8
*The galaxy percentile 20th  sinal-to-noise is: 4.8
*The galaxy percentile 50th  sinal-to-noise is: 10.8
*The galaxy percentile 80th  sinal-to-noise is: 19.1


Running Statmorph
---------------------
Time: 16.7674 s.

*It was create the properties.dat to print the out parameters

Updating the ouput table: properties.dat
------------------------------------
Row was updated...
  GAL
-------
IC4538g


Results for IC4538g
------------------

sky_mean_statmorph =0.001
sky_sigma_statmorph =0.004
flag = 0
flag_sersic = 0

Petrosian Radius 258.5

Sersic Parameters
Re=144.53 , n=0.26, I0=0.05
../_images/notebooks_fitting_13_11.png
../_images/notebooks_fitting_13_12.png

Checking the fitted values from the output table

[6]:
from astropy.table import Table
[7]:
outtable = Table.read('properties.dat',
                      format='ascii')
[8]:
outtable
[8]:
Table length=1
GALradecradvelzmagr20r50r80flux_cflux_erpetro_crpetro_erhalf_crhalf_eGiniM20F(G_M20)S(G_M20)SN_per_pixelCASMIDAoAsSer_ASer_RSer_nSer_xcSer_ycSer_ellipSer_thetaflag_morphflag_sersicpsf_arcsecsize_image_phy_kpcetapetro_extent_cassnrarea_mindebledingarea_min_deblendskybox_xskybox_ysky_methodnsigmanpixelsdilate_sizemask_starsfwhmthresholdroundloroundhisharploaper_starsaper_centerdrViewarea_segmap_pixarea_psf_pixratio_segmap_psfflag_areaflag_area_thsc_ima_arcsec_pixSN_galbckratio_SN_galflag_SNflag_SN_thperc_SN_flagperc_20_SN_galperc_50_SN_galperc_80_SN_galflag_imageflag_bckflag_objectflag_statmorph
str7float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64str15float64float64float64float64float64float64float64float64float64float64float64float64str7float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64float64
IC4538g230.29824363-23.658407552870.00.0096212.82999992370605575.78359016414716139.18953451582684203.07588317543238395.109930284958390.675812781954258.451703011305281.00218759171173138.61743783722682154.665044546699220.39780212998110565-1.124144027656085-1.2118476454278602-0.089431911162901250.184447675943374632.14041587502273560.223064045050802020.059346791939526370.13951929949964260.082181467819325380.0308581961113043560.315055691232189570.201378743266795860.05445565998396477144.528695688700940.26398584235800876653.4776316048807660.35391867105360.191170437636709052.24721395387515880.00.01.957919735.00.21.52.01.00.020.050.050.0masking_sources2.05.011.01.03.010.0-0.50.50.25.010.010.0Face-on193208.041.34678.10.03.00.270.034420.003190000075846910510.80.03.050.04.810.819.10.00.00.00.0