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$)
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
Calculating the image background
------------------------------------------
Masking the sources over the image...
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
--------------
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
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]
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
Calculating the image background
------------------------------------------
Masking the sources over the image...
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
--------------
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
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]
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
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
| GAL | ra | dec | radvel | z | mag | r20 | r50 | r80 | flux_c | flux_e | rpetro_c | rpetro_e | rhalf_c | rhalf_e | Gini | M20 | F(G_M20) | S(G_M20) | SN_per_pixel | C | A | S | M | I | D | Ao | As | Ser_A | Ser_R | Ser_n | Ser_xc | Ser_yc | Ser_ellip | Ser_theta | flag_morph | flag_sersic | psf_arcsec | size_image_phy_kpc | eta | petro_extent_cas | snr | area_min | debleding | area_min_deblend | skybox_x | skybox_y | sky_method | nsigma | npixels | dilate_size | mask_stars | fwhm | threshold | roundlo | roundhi | sharplo | aper_stars | aper_center | dr | View | area_segmap_pix | area_psf_pix | ratio_segmap_psf | flag_area | flag_area_th | sc_ima_arcsec_pix | SN_gal | bck | ratio_SN_gal | flag_SN | flag_SN_th | perc_SN_flag | perc_20_SN_gal | perc_50_SN_gal | perc_80_SN_gal | flag_image | flag_bck | flag_object | flag_statmorph |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| str7 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | str15 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | str7 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 |
| IC4538g | 230.29824363 | -23.65840755 | 2870.0 | 0.00962 | 12.829999923706055 | 75.78359016414716 | 139.18953451582684 | 203.0758831754323 | 8395.10993028495 | 8390.675812781954 | 258.451703011305 | 281.00218759171173 | 138.61743783722682 | 154.66504454669922 | 0.39780212998110565 | -1.124144027656085 | -1.2118476454278602 | -0.08943191116290125 | 0.18444767594337463 | 2.1404158750227356 | 0.22306404505080202 | 0.05934679193952637 | 0.1395192994996426 | 0.08218146781932538 | 0.030858196111304356 | 0.31505569123218957 | 0.20137874326679586 | 0.05445565998396477 | 144.52869568870094 | 0.26398584235800876 | 653.4776316048807 | 660.3539186710536 | 0.19117043763670905 | 2.2472139538751588 | 0.0 | 0.0 | 1.9579197 | 35.0 | 0.2 | 1.5 | 2.0 | 1.0 | 0.0 | 20.0 | 50.0 | 50.0 | masking_sources | 2.0 | 5.0 | 11.0 | 1.0 | 3.0 | 10.0 | -0.5 | 0.5 | 0.2 | 5.0 | 10.0 | 10.0 | Face-on | 193208.0 | 41.3 | 4678.1 | 0.0 | 3.0 | 0.27 | 0.03442 | 0.0031900000758469105 | 10.8 | 0.0 | 3.0 | 50.0 | 4.8 | 10.8 | 19.1 | 0.0 | 0.0 | 0.0 | 0.0 |