EllipSect 3.2.2__tar.gz → 3.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. {EllipSect-3.2.2 → EllipSect-3.4.0}/PKG-INFO +12 -2
  2. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/howto.rst +19 -2
  3. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/PKG-INFO +12 -2
  4. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/plots.py +65 -8
  5. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/prt.py +6 -0
  6. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/read.py +50 -22
  7. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/lib/clas.py +19 -2
  8. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/phot/ned.py +12 -2
  9. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/phot/tidal.py +25 -20
  10. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sectors/sect.py +68 -6
  11. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/test_ellipsect.py +79 -50
  12. {EllipSect-3.2.2 → EllipSect-3.4.0}/AUTHORS.rst +0 -0
  13. {EllipSect-3.2.2 → EllipSect-3.4.0}/CHANGELOG.rst +0 -0
  14. {EllipSect-3.2.2 → EllipSect-3.4.0}/CONTRIBUTING.rst +0 -0
  15. {EllipSect-3.2.2 → EllipSect-3.4.0}/LICENSE.txt +0 -0
  16. {EllipSect-3.2.2 → EllipSect-3.4.0}/README.rst +0 -0
  17. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/Makefile +0 -0
  18. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/_static/.gitignore +0 -0
  19. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/api.rst +0 -0
  20. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/authors.rst +0 -0
  21. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/changelog.rst +0 -0
  22. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/conf.py +0 -0
  23. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/contributing.rst +0 -0
  24. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/index.rst +0 -0
  25. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/license.rst +0 -0
  26. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/readme.rst +0 -0
  27. {EllipSect-3.2.2 → EllipSect-3.4.0}/docs/requirements.txt +0 -0
  28. {EllipSect-3.2.2 → EllipSect-3.4.0}/example/README +0 -0
  29. {EllipSect-3.2.2 → EllipSect-3.4.0}/example/gal.fits +0 -0
  30. {EllipSect-3.2.2 → EllipSect-3.4.0}/example/galfit.feedme +0 -0
  31. {EllipSect-3.2.2 → EllipSect-3.4.0}/example/psf.fits +0 -0
  32. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A2029.ring.png +0 -0
  33. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.comp.png +0 -0
  34. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.con-cub.png +0 -0
  35. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.cub.png +0 -0
  36. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.def.png +0 -0
  37. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.ell-cub.png +0 -0
  38. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.grid.png +0 -0
  39. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.log.png +0 -0
  40. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.pix.png +0 -0
  41. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.png +0 -0
  42. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.ranx1.png +0 -0
  43. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.ranx2.png +0 -0
  44. {EllipSect-3.2.2 → EllipSect-3.4.0}/img/A85.rany1.png +0 -0
  45. {EllipSect-3.2.2 → EllipSect-3.4.0}/pyproject.toml +0 -0
  46. {EllipSect-3.2.2 → EllipSect-3.4.0}/setup.cfg +0 -0
  47. {EllipSect-3.2.2 → EllipSect-3.4.0}/setup.py +0 -0
  48. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/SOURCES.txt +0 -0
  49. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/dependency_links.txt +0 -0
  50. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/entry_points.txt +0 -0
  51. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/not-zip-safe +0 -0
  52. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/requires.txt +0 -0
  53. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/EllipSect.egg-info/top_level.txt +0 -0
  54. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/__init__.py +0 -0
  55. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/ellipsectors.py +0 -0
  56. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/__init__.py +0 -0
  57. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/galfit.py +0 -0
  58. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/inout/gfits.py +0 -0
  59. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/lib/__init__.py +0 -0
  60. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/lib/libs.py +0 -0
  61. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/phot/__init__.py +0 -0
  62. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/phot/phot.py +0 -0
  63. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sectors/__init__.py +0 -0
  64. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sectors/comp.py +0 -0
  65. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sectors/ellip.py +0 -0
  66. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sectors/num.py +0 -0
  67. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sky/__init__.py +0 -0
  68. {EllipSect-3.2.2 → EllipSect-3.4.0}/src/ellipsect/sky/sky.py +0 -0
  69. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/conftest.py +0 -0
  70. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/gal.fits +0 -0
  71. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/galfit.01 +0 -0
  72. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/imgblock.fits +0 -0
  73. {EllipSect-3.2.2 → EllipSect-3.4.0}/tests/psf.fits +0 -0
  74. {EllipSect-3.2.2 → EllipSect-3.4.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EllipSect
3
- Version: 3.2.2
3
+ Version: 3.4.0
4
4
  Summary: A surface brightness analysis tool for GALFIT output.
5
5
  Home-page: https://github.com/canorve/EllipSect
6
6
  Author: Christopher Añorve
@@ -19,8 +19,18 @@ Classifier: Natural Language :: Spanish
19
19
  Classifier: Natural Language :: English
20
20
  Classifier: Topic :: Scientific/Engineering :: Astronomy
21
21
  Description-Content-Type: text/x-rst; charset=UTF-8
22
- Provides-Extra: testing
23
22
  License-File: LICENSE.txt
23
+ Requires-Dist: importlib-metadata
24
+ Requires-Dist: sphinx>=3.2.1
25
+ Requires-Dist: numpy>=1.20.3
26
+ Requires-Dist: astropy>=5.1
27
+ Requires-Dist: scipy>=1.5.2
28
+ Requires-Dist: matplotlib>=3.5.2
29
+ Requires-Dist: mgefit>=5.0.13
30
+ Provides-Extra: testing
31
+ Requires-Dist: setuptools; extra == "testing"
32
+ Requires-Dist: pytest; extra == "testing"
33
+ Requires-Dist: pytest-cov; extra == "testing"
24
34
 
25
35
  .. contents::
26
36
  :depth: 3
@@ -23,14 +23,26 @@ The options are:
23
23
 
24
24
  ::
25
25
 
26
- ellipsect [GALFIT_File] [--logx] [-q AxisRatio] [-pa PositionAngle] [--comp] [--pix] [--ranx/y Value] [--grid] [--dpi Value] [--noplot] [--phot] [--sbout] [--noplot] [--minlevel Value] [--sectors Value] [--object Name] [--filter Name] [--snr] [--help] [--checkimg] [--noned] [--distmod Value] [--magcor Value] [--scalekpc Value][--sbdim Value] [--model ModelImage] [--keep] [--ned XmlFile] [--gradsky ] [--randsky ] [--skyinit Value] [--skyRadmax Value][--skynum Value] [--skybox Value] [--skywidth Value] [--fwhm Value] [--galax ]
26
+
27
+
28
+ ellipsect [-h] [-lx] [-cp] [-px] [-g] [-sb] [-np] [-ph] [-ci] [-nn] [-gsky] [-rsky] [-snr]
29
+ [-re] [-r90] [-r95] [-k] [-gx] [-asp] [-t] [-q AXISRAT] [-pa POSANGLE]
30
+ [-rx RANX RANX] [-ry RANY RANY] [-dpi DOTSINCH] [-ml MINLEVEL] [-sc SECTORS]
31
+ [-ob OBJECT] [-f FILTER] [-dm DISTMOD] [-mc MAGCOR] [-sk SCALEKPC] [-sd SBDIM]
32
+ [-md MODEL] [-sky SKY] [-ned NED] [-ri RADINIT] [-srm SKYRADMAX] [-skb SKYBOX]
33
+ [-skn SKYNUM] [-skw SKYWIDTH] [-distm DISTMAX] [-fw FWHM] [-br BRIGHTNESS]
34
+ [-co CONTRAST] [-cm CMAP] [-nc NUMCOMP] [-ae AEXT] [-hc HCONST] [-om OMEGAM]
35
+ [-ov OMEGAV]
36
+ GalFile
37
+
38
+
27
39
 
28
40
  Below is an explanation of each parameter:
29
41
 
30
42
  **Main input parameters**
31
43
  -------------------------
32
44
 
33
- **GALFIT_File**: GALFIT output file (e.g. galfit.01). This **must** be
45
+ **GalFile**: GALFIT output file (e.g. galfit.01). This **must** be
34
46
  the last GALFIT run. In other words, if there are two files: galfit.01
35
47
  and galfit.02, the one you need is galfit.02
36
48
 
@@ -63,6 +75,11 @@ profiles.
63
75
 
64
76
  **galax**: Only the galaxy surface brightness is plotted.
65
77
 
78
+ **effrad** Draw a vertical line indicating the effective radius
79
+ **rad90** Draw a vertical line indicating the 90% of total light
80
+ **rad95** Draw a vertical line indicating the 95% of total light
81
+
82
+
66
83
  **Photometric output options**
67
84
  ------------------------------
68
85
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EllipSect
3
- Version: 3.2.2
3
+ Version: 3.4.0
4
4
  Summary: A surface brightness analysis tool for GALFIT output.
5
5
  Home-page: https://github.com/canorve/EllipSect
6
6
  Author: Christopher Añorve
@@ -19,8 +19,18 @@ Classifier: Natural Language :: Spanish
19
19
  Classifier: Natural Language :: English
20
20
  Classifier: Topic :: Scientific/Engineering :: Astronomy
21
21
  Description-Content-Type: text/x-rst; charset=UTF-8
22
- Provides-Extra: testing
23
22
  License-File: LICENSE.txt
23
+ Requires-Dist: importlib-metadata
24
+ Requires-Dist: sphinx>=3.2.1
25
+ Requires-Dist: numpy>=1.20.3
26
+ Requires-Dist: astropy>=5.1
27
+ Requires-Dist: scipy>=1.5.2
28
+ Requires-Dist: matplotlib>=3.5.2
29
+ Requires-Dist: mgefit>=5.0.13
30
+ Provides-Extra: testing
31
+ Requires-Dist: setuptools; extra == "testing"
32
+ Requires-Dist: pytest; extra == "testing"
33
+ Requires-Dist: pytest-cov; extra == "testing"
24
34
 
25
35
  .. contents::
26
36
  :depth: 3
@@ -23,7 +23,8 @@ from ellipsect.sectors.num import Interpol
23
23
  from ellipsect.inout.prt import PrintFilesGax
24
24
  from ellipsect.inout.prt import PrintFilesComps
25
25
 
26
-
26
+ from ellipsect.inout.galfit import conver2Sersic
27
+ from ellipsect.inout.galfit import GetReff
27
28
 
28
29
  def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
29
30
  """ Produces final best-fitting plot """
@@ -58,7 +59,7 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
58
59
  # ULISES begin
59
60
  axsec = plt.subplot(gs[0])
60
61
 
61
- axsec.set_ylabel("Surface Brightness (mag/'')")
62
+ axsec.set_ylabel(r"Surface Brightness $(mag\; arcsec^{-2})$")
62
63
  # ULISES end
63
64
 
64
65
  axsec.errorbar(xradq, ysbq,yerr=ysberrq,fmt='o-',capsize=2,color='red',markersize=0.7,label="galaxy",linewidth=2)
@@ -97,9 +98,24 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
97
98
  #begin psf fwhm
98
99
  if ellconf.flagfwhm:
99
100
  xpos = ellconf.fwhm*scale
100
- axsec.axvline(x=xpos, linestyle='--', color='k', linewidth=2)
101
+ axsec.axvline(x=xpos, linestyle='--', color='k', label='FWHM', linewidth=2)
101
102
  # end
102
103
 
104
+ #effective radius
105
+ if ellconf.flagrep:
106
+ xre = ellconf.rep*scale
107
+ axsec.axvline(x=xre, linestyle='--', color='r', label='Re', linewidth=1.5)
108
+
109
+ #90% of total light radius
110
+ if ellconf.flagr90p:
111
+ xr90 = ellconf.r90p*scale
112
+ axsec.axvline(x = xr90, linestyle='--', color='b', label='R90', linewidth=1.5)
113
+
114
+ #95% of total light radius
115
+ if ellconf.flagr95p:
116
+ xr95 = ellconf.r95p*scale
117
+ axsec.axvline(x = xr95, linestyle='--', color='c', label='R95', linewidth=1.5)
118
+
103
119
 
104
120
  # ULISES begin
105
121
  axsec.axes.xaxis.set_ticklabels([])
@@ -109,6 +125,8 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
109
125
  axsec.yaxis.set_minor_locator(AutoMinorLocator())
110
126
  axsec.yaxis.set_major_locator(AutoLocator())
111
127
 
128
+ if ellconf.title:
129
+ plt.title(ellconf.namefile, fontsize=10)
112
130
 
113
131
  # ULISES begin
114
132
  # Residual plot
@@ -136,7 +154,7 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
136
154
  axred.errorbar(xradq, residual, yerr=err,fmt='.',capsize=2,color='k')
137
155
 
138
156
  axred.axhline(y=0,ls='dashed', color='k')
139
- axred.set_xlabel('Radius (arcsec)')
157
+ axred.set_xlabel('Radius $(arcsec)$')
140
158
  axred.set_ylabel('Residual (%)')
141
159
  axred.set_ylim(-2,2)
142
160
  # ULISES end
@@ -373,7 +391,6 @@ class ShowCube:
373
391
  data[mask] = 1 # avoids problems in log
374
392
 
375
393
  fig, (ax1, ax2, ax3) = plt.subplots(figsize=(14, 5), nrows = 1, ncols = 3)
376
- fig.subplots_adjust(left=0.04, right=0.98, bottom=0.02, top=0.98)
377
394
 
378
395
  im = ax1.imshow(newdata, origin ='lower', interpolation='nearest', norm
379
396
  = colors.LogNorm(vmin=modmin, vmax=modmax), cmap = cmap)
@@ -422,6 +439,7 @@ class ShowCube:
422
439
  ax3.set_title('Residual')
423
440
 
424
441
 
442
+ fig.subplots_adjust(left=0.04, right=0.98, bottom=0.02, top=0.98)
425
443
  plt.savefig(namepng, dpi = dpival)
426
444
 
427
445
 
@@ -430,6 +448,11 @@ class ShowCube:
430
448
 
431
449
  def PlotMul(ellconf, galhead, galcomps, mgegal, mgemod, mgecom):
432
450
 
451
+
452
+
453
+ comps = conver2Sersic(galcomps) #to compute Re
454
+
455
+
433
456
  fignum = 1
434
457
 
435
458
  minrad = np.min(mgegal.rad)
@@ -459,19 +482,29 @@ def PlotMul(ellconf, galhead, galcomps, mgegal, mgemod, mgecom):
459
482
 
460
483
  plt.clf()
461
484
 
485
+
486
+ if ellconf.title:
487
+ plt.title(ellconf.namefile, fontsize=10)
488
+
489
+
490
+
462
491
  fig, axsec = plt.subplots(nrows, 2, sharex=True, sharey='col', num=fignum)
463
492
  fig.subplots_adjust(hspace=0.01)
464
493
 
465
494
 
495
+
496
+
497
+
498
+
466
499
  if ellconf.flagpix:
467
500
  axpix = axsec[0,0].twiny()
468
501
  axpix2 = axsec[0,1].twiny()
469
502
 
470
- fig.text(0.04, 0.5, "Surface Brightness (mag/'')", va='center', rotation='vertical')
503
+ fig.text(0.04, 0.5, r"Surface Brightness $(mag\; arcsec^{-2})$", va='center', rotation='vertical')
471
504
  fig.text(0.96, 0.5, 'error ', va='center', rotation='vertical')
472
505
 
473
- axsec[-1, 0].set_xlabel("radius ('')")
474
- axsec[-1, 1].set_xlabel("radius ('')")
506
+ axsec[-1, 0].set_xlabel("radius $(arcsec)$")
507
+ axsec[-1, 1].set_xlabel("radius $(arcsec)$")
475
508
 
476
509
  if ellconf.flaglogx == True:
477
510
  axsec[-1, 0].xaxis.set_major_locator(LogLocator(base=10.0, numticks=15))
@@ -549,6 +582,30 @@ def PlotMul(ellconf, galhead, galcomps, mgegal, mgemod, mgecom):
549
582
  # end
550
583
 
551
584
 
585
+ #effective radius
586
+ if ellconf.flagrep:
587
+ eff = 0.5
588
+ xre, tempmag = GetReff().GetReSer(galhead, comps, eff, txtangsky)
589
+
590
+ xre = xre*galhead.scale
591
+ axsec[row, 0].axvline(x=xre, linestyle='--', color='r', label='Re', linewidth=1.5)
592
+
593
+ #90% radius
594
+ if ellconf.flagr90p:
595
+ eff = 0.9
596
+ xr90, tempmag = GetReff().GetReSer(galhead, comps, eff, txtangsky)
597
+
598
+ xr90 = xr90*galhead.scale
599
+ axsec[row, 0].axvline(x = xr90, linestyle='--', color='b', label='R90', linewidth=1.5)
600
+
601
+ #95% radius
602
+ if ellconf.flagr95p:
603
+ eff = 0.95
604
+ xr95, tempmag = GetReff().GetReSer(galhead, comps, eff, txtangsky)
605
+
606
+ xr95 = xr95*galhead.scale
607
+ axsec[row, 0].axvline(x = xr95, linestyle='--', color='c', label='R95', linewidth=1.5)
608
+
552
609
 
553
610
 
554
611
 
@@ -391,6 +391,12 @@ def printPhot(ellconf, galhead, galcomps, dataned, datatidal, sectgalax):
391
391
  lineout = "# All photometric quantities are computed for filter {} (use -filter option to change it) \n".format(ellconf.band)
392
392
  OUTPHOT.write(lineout)
393
393
 
394
+
395
+
396
+ lineout = '# Cosmology: hconst = {}, omega m = {}, omega lambda= {}'.format(ellconf.hconst,ellconf.omegam,ellconf.omegav)
397
+ OUTPHOT.write(lineout)
398
+
399
+
394
400
  lineout = "# Magnitudes are not corrected by K-Correction \n"
395
401
  OUTPHOT.write(lineout)
396
402
 
@@ -68,7 +68,15 @@ def InitParsing():
68
68
  parser.add_argument("-gsky","--gradsky", action="store_true", help="computes sky using the gradient method")
69
69
  parser.add_argument("-rsky","--randsky", action="store_true", help="computes sky using random boxes")
70
70
  parser.add_argument("-snr","--snr", action="store_true", help="Creates Signal to Noise image if phot is activated")
71
- parser.add_argument("-chi","--chisqr", action="store_true", help="Creates Chi-square image if phot is activated")
71
+ #parser.add_argument("-chi","--chisqr", action="store_true", help="Creates Chi-square image if phot is activated")
72
+
73
+
74
+ parser.add_argument("-re","--effrad", action="store_true", help="Draw a vertical line indicating the effective radius")
75
+
76
+ parser.add_argument("-r90","--rad90", action="store_true", help="Draw a vertical line indicating the 90%% of total light")
77
+
78
+ parser.add_argument("-r95","--rad95", action="store_true", help="Draw a vertical line indicating the 95%% of total light")
79
+
72
80
 
73
81
  parser.add_argument("-k","--keep", action="store_true", help="use existing file to compute subcomponents")
74
82
  parser.add_argument("-gx","--galax", action="store_true", help="only the galaxy surface brightness is shown in the plot")
@@ -78,7 +86,11 @@ def InitParsing():
78
86
  + "Default mode removes top %%80 and bottom %%20 sky pixels "
79
87
  parser.add_argument("-asp","--allskypx", action="store_true",
80
88
  help=linehelp)
81
-
89
+
90
+
91
+
92
+ parser.add_argument("-t","--title", action="store_true", help="put title on plots")
93
+
82
94
  #options with arguments
83
95
  #parser.add_argument("-cn","--center",nargs=2,action="store", type=float, help="galaxy's center ")
84
96
 
@@ -87,8 +99,8 @@ def InitParsing():
87
99
  parser.add_argument("-rx","--ranx",nargs=2, type=float, help="provide a range for x-axis: xmin - xmax ")
88
100
  parser.add_argument("-ry","--rany", nargs=2,type=float, help="provide a range for y-axis: ymin - ymax ")
89
101
  parser.add_argument("-dpi","--dotsinch", type=int, help="dots per inch used for images files ")
90
- parser.add_argument("-ml","--minlevel", type=float, help="parameter given directly to sectors_photometry. ")
91
- parser.add_argument("-sc","--sectors", type=int, help="parameter given directly to sectors_photometry. Divide elipse in 'sectors'")
102
+ parser.add_argument("-ml","--minlevel", type=float, help="parameter given to sectors_photometry. ")
103
+ parser.add_argument("-sc","--sectors", type=int, help="parameter given to sectors_photometry. It divides the ellipse in 'sectors'")
92
104
  parser.add_argument("-ob","--object", help="used for 'phot' to search in NED")
93
105
  parser.add_argument("-f","--filter", help="used for 'phot' to indicate band for NED ")
94
106
  parser.add_argument("-dm","--distmod", type=float, help="Introduce Distance Modulus ")
@@ -130,7 +142,15 @@ def InitParsing():
130
142
  parser.add_argument("-ae","--aext", type=float,
131
143
  help="Surface brightness correction for plots only ", default=0)
132
144
 
133
-
145
+ parser.add_argument("-hc","--hconst", type=float,
146
+ help="hubble constant to download xml file from NED ", default=67.8)
147
+
148
+ parser.add_argument("-om","--omegam", type=float,
149
+ help="omega matter value to download xml file from NED ", default=.308)
150
+
151
+ parser.add_argument("-ov","--omegav", type=float,
152
+ help="omega lambda value to download xml file from NED ", default=0.692)
153
+
134
154
 
135
155
  # every new parameter added here must be
136
156
  # also added in function PassArgs() in ellipsect/sectors/sect.py
@@ -490,37 +510,45 @@ def prefixNames(ellconf, outimage):
490
510
  numstr = gal_ext[1]
491
511
  numstr = numstr[1:]
492
512
 
513
+ if ellconf.numcomp:
514
+ precomp = "-nc" + str(ellconf.numcomp)
515
+ else:
516
+ precomp = ""
517
+
518
+
519
+
520
+
493
521
  if numstr.isnumeric():
494
522
 
495
523
  # names for the different png
496
- ellconf.namepng = ellconf.namefile + '-' + numstr + ".png"
497
- ellconf.namesec = ellconf.namefile + '-' + numstr + "-gal.png"
498
- ellconf.namemod = ellconf.namefile + '-' + numstr + "-mod.png"
499
- ellconf.namemul = ellconf.namefile + '-' + numstr + "-mul.png"
500
- ellconf.namesub = ellconf.namefile + '-' + numstr + "-comp.fits"
524
+ ellconf.namepng = ellconf.namefile + '-g' + numstr + precomp + "-splot.png"
525
+ ellconf.namesec = ellconf.namefile + '-g' + numstr + precomp + "-gal.png"
526
+ ellconf.namemod = ellconf.namefile + '-g' + numstr + precomp + "-mod.png"
527
+ ellconf.namemul = ellconf.namefile + '-g' + numstr + precomp + "-mplot.png"
528
+ ellconf.namesub = ellconf.namefile + '-g' + numstr + precomp + "-comp.fits"
501
529
 
502
- ellconf.namesig = ellconf.namefile + '-' + numstr + "-sig.fits"
530
+ ellconf.namesig = ellconf.namefile + '-g' + numstr + precomp + "-sig.fits"
503
531
 
504
532
 
505
- ellconf.sboutput = ellconf.namefile + '-' + numstr + "-sbout"
506
- ellconf.output = ellconf.namefile + '-' + numstr + "-out.txt"
533
+ ellconf.sboutput = ellconf.namefile + '-g' + numstr + precomp + "-sbout"
534
+ ellconf.output = ellconf.namefile + '-g' + numstr + precomp + "-out.txt"
507
535
 
508
- ellconf.namened = ellconf.namefile + '-' + numstr + "-ned.xml"
536
+ ellconf.namened = ellconf.namefile + '-g' + numstr + precomp + "-ned.xml"
509
537
 
510
- ellconf.namesnr = ellconf.namefile + '-' + numstr + "-snr.fits"
511
- ellconf.namecheck = ellconf.namefile + '-' + numstr + "-check.fits"
512
- ellconf.namering = ellconf.namefile + '-' + numstr + "-ring.fits"
513
- ellconf.nameringmask = ellconf.namefile + '-' + numstr + "-ringmask.fits"
514
- ellconf.namecube = ellconf.namefile + '-' + numstr + "-cub.png"
515
- ellconf.namechi = ellconf.namefile + '-' + numstr + "-chi.fits"
538
+ ellconf.namesnr = ellconf.namefile + '-g' + numstr + precomp + "-snr.fits"
539
+ ellconf.namecheck = ellconf.namefile + '-g' + numstr + precomp + "-check.fits"
540
+ ellconf.namering = ellconf.namefile + '-g' + numstr + precomp + "-ring.fits"
541
+ ellconf.nameringmask = ellconf.namefile + '-g' + numstr + precomp + "-ringmask.fits"
542
+ ellconf.namecube = ellconf.namefile + '-g' + numstr + precomp + "-cub.png"
543
+ ellconf.namechi = ellconf.namefile + '-g' + numstr + precomp + "-chi.fits"
516
544
 
517
545
  else:
518
546
 
519
547
  # names for the different png
520
- ellconf.namepng = ellconf.namefile + ".png"
548
+ ellconf.namepng = ellconf.namefile + "-splot.png"
521
549
  ellconf.namesec = ellconf.namefile + "-gal.png"
522
550
  ellconf.namemod = ellconf.namefile + "-mod.png"
523
- ellconf.namemul = ellconf.namefile + "-mul.png"
551
+ ellconf.namemul = ellconf.namefile + "-mplot.png"
524
552
  ellconf.namesub = ellconf.namefile + "-comp.fits"
525
553
 
526
554
  ellconf.namesig = ellconf.namefile + "-sig.fits"
@@ -42,7 +42,7 @@ class EllipSectConfig:
42
42
  flagband=False
43
43
  flagweb=False # to check connection to ned
44
44
  flagsnr = False
45
- flagchi = False
45
+ #flagchi = False
46
46
 
47
47
  flagcheck=False
48
48
  flagned=False
@@ -74,6 +74,9 @@ class EllipSectConfig:
74
74
 
75
75
  flagfwhm = False
76
76
 
77
+ flagrep = False
78
+ flagr90p = False
79
+ flagr95p = False
77
80
  #flagcent = False
78
81
 
79
82
  flagrmsky=True
@@ -97,7 +100,7 @@ class EllipSectConfig:
97
100
  minlevel=0
98
101
  sectors=19
99
102
 
100
-
103
+ title = False
101
104
 
102
105
  #input file
103
106
  galfile= "galfit.01"
@@ -153,6 +156,10 @@ class EllipSectConfig:
153
156
 
154
157
  fwhm = 2
155
158
 
159
+ rep = 0
160
+ r90p = 0
161
+ r95p = 0
162
+
156
163
  distmax = 10
157
164
 
158
165
  brightness = 0
@@ -176,6 +183,11 @@ class EllipSectConfig:
176
183
 
177
184
  Aext = 0 # surface brightness correction for plots
178
185
 
186
+ hconst = 67.8
187
+ omegam = 0.308
188
+ omegav = 0.692
189
+
190
+
179
191
 
180
192
  #class to comunicate externally:
181
193
  class PhotAPI:
@@ -237,6 +249,11 @@ class PhotAPI:
237
249
  inputimage="galaxy.fits"
238
250
  Aext = 0
239
251
 
252
+ hconst = 67.8
253
+ omegam = 0.308
254
+ omegav = 0.692
255
+
256
+
240
257
  # from gradsky
241
258
  gradskymean = 0
242
259
  gradskystd = 0
@@ -43,6 +43,8 @@ def NED(ellconf):
43
43
 
44
44
  nedweb="https://ned.ipac.caltech.edu/cgi-bin/nph-objsearch?extend=no&of=xml_all&objname="
45
45
 
46
+
47
+
46
48
  if ellconf.flagnedfile:
47
49
  filened = ellconf.nedfile
48
50
  else:
@@ -56,8 +58,8 @@ def NED(ellconf):
56
58
  Scalekpc=ellconf.InScale
57
59
  SbDim=ellconf.InSbDim
58
60
  else:
59
- #checar si el archivo existe para no hacer conexion a internet
60
61
  if(not(os.path.isfile(filened))):
62
+ #verifica si el archivo existe para no hacer conexion a internet
61
63
 
62
64
  if ellconf.flagnedfile:
63
65
  print("can't find user's ned {} file ".format(filened))
@@ -65,10 +67,18 @@ def NED(ellconf):
65
67
  else:
66
68
  # command for wget
67
69
  #wget -O NED_51.xml "https://ned.ipac.caltech.edu/cgi-bin/nph-objsearch?extend=no&of=xml_all&objname=m+51"
68
- wgetcmd = 'wget -O {} "{}{}"'.format(filened,nedweb,objname)
70
+
71
+ #https://ned.ipac.caltech.edu/cgi-bin/nph-objsearch?extend=no&of=xml_all&objname=ngc+6166&hconst=67.8&omegam=0.308&omegav=0.692
72
+
73
+
74
+ wgetcmd = 'wget -O {} "{}{}&hconst={:.1f}\&omegam={:.3f}\&omegav={:.3f}"'.format(
75
+ filened,nedweb,objname,ellconf.hconst,ellconf.omegam,ellconf.omegav)
69
76
 
70
77
  print("Running: ",wgetcmd)
71
78
 
79
+ print('Cosmology: hconst = {}, omega m= {}, omega lambda= {}'.format(ellconf.hconst,ellconf.omegam,ellconf.omegav))
80
+
81
+
72
82
  errwg = sp.run([wgetcmd], shell=True, stdout=sp.PIPE,stderr=sp.PIPE, universal_newlines=True)
73
83
 
74
84
  if errwg.returncode != 0:
@@ -179,28 +179,33 @@ def Tidal(datatidal, ellconf, dataimg, galhead, galcomps, sectgalax, rmin):
179
179
  # creation of the Chi-square image
180
180
  ##################################
181
181
 
182
- if ellconf.flagchi:
183
- header['TypeIMG'] = ('CHI-SQR', 'Chi-Square image')
184
- hdu[0].header = header
182
+ #if ellconf.flagchi:
185
183
 
184
+ header['TypeIMG'] = ('CHI-SQR', 'Chi-Square image')
185
+ hdu[0].header = header
186
186
 
187
- maskchi = immask == True # big image coordinates
188
187
 
188
+ maskchi = immask == True # big image coordinates
189
189
 
190
- if imgal.shape == imsigma.shape:
191
- dataimg.imchi = (imgal - immodel)**2 / imsigma**2
192
- if maskchi.any():
193
- dataimg.imchi[maskchi] = 0
194
- else:
195
- print("WARNING: Chi-square image can not be computed" +
196
- "because galaxy and sigma images have different shapes")
197
- dataimg.imchi = np.ones(imgal.shape)
198
-
199
- hdu[0].data = dataimg.imchi
200
190
 
201
- hdu.writeto(ellconf.namechi, overwrite=True)
202
- print("Chi square image created.. ", ellconf.namechi)
191
+ if imgal.shape == imsigma.shape:
192
+ dataimg.imchi = (imgal - immodel)**2 / imsigma**2
193
+ if maskchi.any():
194
+ dataimg.imchi[maskchi] = 0
195
+ else:
196
+ print("WARNING: Chi-square image can not be computed" +
197
+ "because galaxy and sigma images have different shapes")
198
+ dataimg.imchi = np.ones(imgal.shape)
199
+
200
+ hdu[0].data = dataimg.imchi
201
+
202
+ hdu.writeto(ellconf.namechi, overwrite=True)
203
+ print("Chi square image created.. ", ellconf.namechi)
204
+
203
205
 
206
+ ##################################
207
+ # end of the Chi-square image
208
+ ##################################
204
209
 
205
210
 
206
211
 
@@ -433,10 +438,10 @@ def ExtractEllip(imagemat, idn, x, y, R, theta, ell, xmin, xmax, ymin, ymax):
433
438
  "It returns the area of ellipse with idn values. "
434
439
 
435
440
 
436
- xmin = np.int(xmin)
437
- xmax = np.int(xmax)
438
- ymin = np.int(ymin)
439
- ymax = np.int(ymax)
441
+ xmin = int(xmin)
442
+ xmax = int(xmax)
443
+ ymin = int(ymin)
444
+ ymax = int(ymax)
440
445
 
441
446
  q = (1 - ell)
442
447
  bim = q * R
@@ -35,7 +35,11 @@ from ellipsect.lib.clas import EllipSectConfig
35
35
 
36
36
  from ellipsect.inout.galfit import Galfit
37
37
  from ellipsect.inout.galfit import numComps
38
+ from ellipsect.inout.galfit import conver2Sersic
38
39
  from ellipsect.inout.galfit import readDataImg
40
+ from ellipsect.inout.galfit import GetReff
41
+
42
+ from ellipsect.inout.gfits import GetFits
39
43
 
40
44
  from ellipsect.inout.prt import printEllinfo
41
45
 
@@ -81,7 +85,10 @@ def SectorsGalfit(args):
81
85
  prefixNames(ellconf, galhead.outimage)
82
86
 
83
87
  if os.path.isfile(galhead.sigimage):
84
- ellconf.namesig = galhead.sigimage #using existing sigma file
88
+ #ellconf.namesig = galhead.sigimage #using existing sigma file
89
+ GetFits(galhead.sigimage, ellconf.namesig, galhead.xmin, galhead.xmax,
90
+ galhead.ymin, galhead.ymax)
91
+
85
92
 
86
93
 
87
94
 
@@ -107,7 +114,11 @@ def SectorsGalfit(args):
107
114
  dataimg.img = dataimg.img - ellconf.skylevel
108
115
  dataimg.model = dataimg.model - ellconf.skylevel
109
116
 
110
- plotCube(ellconf, galhead, galcomps) #plots the cube image
117
+
118
+
119
+ comps = conver2Sersic(galcomps)
120
+
121
+ plotCube(ellconf, galhead, comps) #plots the cube image
111
122
 
112
123
 
113
124
  # numsectors=19 default
@@ -137,6 +148,23 @@ def SectorsGalfit(args):
137
148
  skyCall(ellconf, galhead, galcomps)
138
149
 
139
150
 
151
+ #computing fraction of light radius
152
+ if ellconf.flagrep:
153
+ eff = 0.5
154
+ ellconf.rep, tempmag = GetReff().GetReSer(galhead, comps, eff, ellconf.parg)
155
+
156
+ if ellconf.flagr90p:
157
+ eff = 0.9
158
+ ellconf.r90p, tempmag = GetReff().GetReSer(galhead, comps, eff, ellconf.parg)
159
+
160
+ if ellconf.flagr95p:
161
+ eff = 0.95
162
+ ellconf.r95p, tempmag = GetReff().GetReSer(galhead, comps, eff, ellconf.parg)
163
+
164
+
165
+
166
+
167
+
140
168
 
141
169
  print("creating plots..")
142
170
 
@@ -389,8 +417,8 @@ def SectPhotComp(ellconf, dataimg, galcomps, n_sectors=19, minlevel=0):
389
417
 
390
418
  subim = subimgs[i]
391
419
 
392
- eps = 1 - galcomps.AxRat[n]
393
- angsec = 90 - galcomps.PosAng[n]
420
+ #eps = 1 - galcomps.AxRat[n] #removed because it must follow the axrat of galaxy
421
+ #angsec = 90 - galcomps.PosAng[n] #same but for angle
394
422
 
395
423
 
396
424
  if ellconf.flagcheck:
@@ -537,6 +565,14 @@ def PassVars(photapi, ellconf, galhead, galcomps):
537
565
  photapi.kser = galcomps.kser.copy()
538
566
 
539
567
 
568
+ photapi.hconst = ellconf.hconst
569
+
570
+ photapi.omegam = ellconf.omegam
571
+
572
+ photapi.omegav = ellconf.omegav
573
+
574
+
575
+
540
576
 
541
577
 
542
578
  def PassArgs(args):
@@ -605,9 +641,12 @@ def PassArgs(args):
605
641
  if args.allskypx:
606
642
  ellconf.flagrmsky=False
607
643
 
608
- if args.chisqr:
609
- ellconf.flagchi = True
644
+ #if args.chisqr:
645
+ # ellconf.flagchi = True
610
646
 
647
+ if args.title:
648
+ ellconf.title = args.title
649
+
611
650
 
612
651
  #options with arguments
613
652
 
@@ -728,6 +767,29 @@ def PassArgs(args):
728
767
  ellconf.Aext = args.aext
729
768
 
730
769
 
770
+ if args.hconst:
771
+ ellconf.hconst = args.hconst
772
+
773
+ if args.omegam:
774
+ ellconf.omegam = args.omegam
775
+
776
+ if args.omegav:
777
+ ellconf.omegav = args.omegav
778
+
779
+
780
+
781
+ if args.effrad:
782
+ ellconf.flagrep = True
783
+
784
+
785
+ if args.rad90:
786
+ ellconf.flagr90p = True
787
+
788
+
789
+ if args.rad95:
790
+ ellconf.flagr95p = True
791
+
792
+
731
793
 
732
794
 
733
795
  return ellconf
@@ -39,8 +39,8 @@ def test_files():
39
39
 
40
40
  path="tests/"
41
41
 
42
- filepng = "imgblock-01.png"
43
- filemulpng = "imgblock-01-mul.png"
42
+ filepng = "imgblock-g01-nc1-splot.png"
43
+ filemulpng = "imgblock-g01-nc1-mplot.png"
44
44
 
45
45
  filepng = path+filepng
46
46
  filemulpng = path+filemulpng
@@ -78,15 +78,17 @@ def test_comp():
78
78
 
79
79
  path="tests/"
80
80
 
81
- filepng = "imgblock-01.png"
82
- filemulpng = "imgblock-01-mul.png"
81
+ filepng = "imgblock-g01-nc1-splot.png"
82
+ filemulpng = "imgblock-g01-nc1-mplot.png"
83
+
84
+
83
85
 
84
86
  filepng = path+filepng
85
87
  filemulpng = path+filemulpng
86
88
 
87
89
 
88
90
 
89
- filecomp = "imgblock-01-comp.fits"
91
+ filecomp = "imgblock-g01-nc1-comp.fits"
90
92
 
91
93
  filecomp= path+filecomp
92
94
 
@@ -128,22 +130,24 @@ def test_phot():
128
130
 
129
131
  path="tests/"
130
132
 
131
- filephot = "imgblock-01-out.txt"
133
+ filephot = "imgblock-g01-nc1-out.txt"
132
134
  filephot= path+filephot
133
135
 
134
- filecomp = "imgblock-01-comp.fits"
136
+ filecomp = "imgblock-g01-nc1-comp.fits"
135
137
  filecomp= path+filecomp
136
138
 
137
- filepng = "imgblock-01.png"
138
- filemulpng = "imgblock-01-mul.png"
139
+ filepng = "imgblock-g01-nc1-splot.png"
140
+ filemulpng = "imgblock-g01-nc1-mplot.png"
141
+
139
142
 
140
- filesig = "imgblock-01-sig.fits"
143
+
144
+ filesig = "imgblock-g01-nc1-sig.fits"
141
145
  filesig= path+filesig
142
146
 
143
- filecheck = "imgblock-01-check.fits"
147
+ filecheck = "imgblock-g01-nc1-check.fits"
144
148
  filecheck= path+filecheck
145
149
 
146
- filecube = "imgblock-01-cub.png"
150
+ filecube = "imgblock-g01-nc1-cub.png"
147
151
  filecube = path+filecube
148
152
 
149
153
 
@@ -259,30 +263,36 @@ def test_gsky():
259
263
 
260
264
  path="tests/"
261
265
 
262
- filephot = "imgblock-01-out.txt"
266
+
267
+ filephot = "imgblock-g01-nc1-out.txt"
263
268
  filephot= path+filephot
264
269
 
265
- filecomp = "imgblock-01-comp.fits"
270
+ filecomp = "imgblock-g01-nc1-comp.fits"
266
271
  filecomp= path+filecomp
267
272
 
268
- filepng = "imgblock-01.png"
269
- filemulpng = "imgblock-01-mul.png"
273
+ filepng = "imgblock-g01-nc1-splot.png"
274
+ filemulpng = "imgblock-g01-nc1-mplot.png"
270
275
 
271
- filesig = "imgblock-01-sig.fits"
276
+ filesig = "imgblock-g01-nc1-sig.fits"
272
277
  filesig= path+filesig
273
278
 
274
- filecheck = "imgblock-01-check.fits"
279
+ filecheck = "imgblock-g01-nc1-check.fits"
275
280
  filecheck= path+filecheck
276
281
 
277
- filecube = "imgblock-01-cub.png"
282
+ filecube = "imgblock-g01-nc1-cub.png"
278
283
  filecube = path+filecube
279
284
 
280
- filersky = "imgblock-01-ring.fits"
285
+ filersky = "imgblock-g01-nc1-ring.fits"
281
286
  filersky = path + filersky
282
287
 
283
- filermsky = "imgblock-01-ringmask.fits"
288
+ filermsky = "imgblock-g01-nc1-ringmask.fits"
284
289
  filermsky = path + filermsky
285
290
 
291
+ filechi = "imgblock-g01-nc1-chi.fits"
292
+ filechi = path + filechi
293
+
294
+
295
+
286
296
 
287
297
 
288
298
  filepng = path+filepng
@@ -374,30 +384,37 @@ def test_rsky():
374
384
 
375
385
  path="tests/"
376
386
 
377
- filephot = "imgblock-01-out.txt"
387
+ filephot = "imgblock-g01-nc1-out.txt"
378
388
  filephot= path+filephot
379
389
 
380
- filecomp = "imgblock-01-comp.fits"
390
+ filecomp = "imgblock-g01-nc1-comp.fits"
381
391
  filecomp= path+filecomp
382
392
 
383
- filepng = "imgblock.01-png"
384
- filemulpng = "imgblock-01-mul.png"
393
+ filepng = "imgblock-g01-nc1-splot.png"
394
+ filemulpng = "imgblock-g01-nc1-mplot.png"
385
395
 
386
- filesig = "imgblock-01-sig.fits"
396
+ filesig = "imgblock-g01-nc1-sig.fits"
387
397
  filesig= path+filesig
388
398
 
389
- filecheck = "imgblock-01-check.fits"
399
+ filecheck = "imgblock-g01-nc1-check.fits"
390
400
  filecheck= path+filecheck
391
401
 
392
- filecube = "imgblock-01-cub.png"
402
+ filecube = "imgblock-g01-nc1-cub.png"
393
403
  filecube = path+filecube
394
404
 
395
- filersky = "imgblock-01-ring.fits"
405
+ filersky = "imgblock-g01-nc1-ring.fits"
396
406
  filersky = path + filersky
397
407
 
398
- filermsky = "imgblock-01-ringmask.fits"
408
+ filermsky = "imgblock-g01-nc1-ringmask.fits"
399
409
  filermsky = path + filermsky
400
410
 
411
+ filechi = "imgblock-g01-nc1-chi.fits"
412
+ filechi = path + filechi
413
+
414
+
415
+
416
+
417
+
401
418
 
402
419
 
403
420
  filepng = path+filepng
@@ -491,30 +508,35 @@ def test_freepar():
491
508
 
492
509
  path="tests/"
493
510
 
494
- filephot = "imgblock-01-out.txt"
511
+ filephot = "imgblock-g01-nc1-out.txt"
495
512
  filephot= path+filephot
496
513
 
497
- filecomp = "imgblock-01-comp.fits"
514
+ filecomp = "imgblock-g01-nc1-comp.fits"
498
515
  filecomp= path+filecomp
499
516
 
500
- filepng = "imgblock-01.png"
501
- filemulpng = "imgblock-mul.png"
517
+ filepng = "imgblock-g01-nc1-splot.png"
518
+ filemulpng = "imgblock-g01-nc1-mplot.png"
502
519
 
503
- filesig = "imgblock-01-sig.fits"
520
+ filesig = "imgblock-g01-nc1-sig.fits"
504
521
  filesig= path+filesig
505
522
 
506
- filecheck = "imgblock-01-check.fits"
523
+ filecheck = "imgblock-g01-nc1-check.fits"
507
524
  filecheck= path+filecheck
508
525
 
509
- filecube = "imgblock-01-cub.png"
526
+ filecube = "imgblock-g01-nc1-cub.png"
510
527
  filecube = path+filecube
511
528
 
512
- filersky = "imgblock-01-ring.fits"
529
+ filersky = "imgblock-g01-nc1-ring.fits"
513
530
  filersky = path + filersky
514
531
 
515
- filermsky = "imgblock-01-ringmask.fits"
532
+ filermsky = "imgblock-g01-nc1-ringmask.fits"
516
533
  filermsky = path + filermsky
517
534
 
535
+ filechi = "imgblock-g01-nc1-chi.fits"
536
+ filechi = path + filechi
537
+
538
+
539
+
518
540
 
519
541
 
520
542
  filepng = path+filepng
@@ -624,30 +646,33 @@ def test_img_size():
624
646
 
625
647
  path="tests/"
626
648
 
627
- filephot = "imgblock-01-out.txt"
649
+ filephot = "imgblock-g01-nc1-out.txt"
628
650
  filephot= path+filephot
629
651
 
630
- filecomp = "imgblock-01-comp.fits"
652
+ filecomp = "imgblock-g01-nc1-comp.fits"
631
653
  filecomp= path+filecomp
632
654
 
633
- filepng = "imgblock-01.png"
634
- filemulpng = "imgblock-01-mul.png"
655
+ filepng = "imgblock-g01-nc1-splot.png"
656
+ filemulpng = "imgblock-g01-nc1-mplot.png"
635
657
 
636
- filesig = "imgblock-01-sig.fits"
658
+ filesig = "imgblock-g01-nc1-sig.fits"
637
659
  filesig= path+filesig
638
660
 
639
- filecheck = "imgblock-01-check.fits"
661
+ filecheck = "imgblock-g01-nc1-check.fits"
640
662
  filecheck= path+filecheck
641
663
 
642
- filecube = "imgblock-01-cub.png"
664
+ filecube = "imgblock-g01-nc1-cub.png"
643
665
  filecube = path+filecube
644
666
 
645
- filersky = "imgblock-01-ring.fits"
667
+ filersky = "imgblock-g01-nc1-ring.fits"
646
668
  filersky = path + filersky
647
669
 
648
- filermsky = "imgblock-01-ringmask.fits"
670
+ filermsky = "imgblock-g01-nc1-ringmask.fits"
649
671
  filermsky = path + filermsky
650
672
 
673
+ filechi = "imgblock-g01-nc1-chi.fits"
674
+ filechi = path + filechi
675
+
651
676
 
652
677
  tempmask="tempmask.fits"
653
678
  filetempmask = tempmask
@@ -684,7 +709,9 @@ def test_img_size():
684
709
  if os.path.isfile(filetempmask):
685
710
  os.remove(filetempmask)
686
711
 
687
-
712
+ if os.path.isfile(filechi):
713
+ os.remove(filechi)
714
+
688
715
 
689
716
  from ellipsect.inout.galfit import Galfit
690
717
  from ellipsect.sectors.sect import PassArgs
@@ -761,7 +788,9 @@ def test_img_size():
761
788
  if os.path.isfile(filetempmask):
762
789
  os.remove(filetempmask)
763
790
 
764
-
791
+ if os.path.isfile(filechi):
792
+ os.remove(filechi)
793
+
765
794
 
766
795
 
767
796
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes