EllipSect 3.4.1__tar.gz → 3.4.3__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.4.1 → ellipsect-3.4.3}/PKG-INFO +1 -1
  2. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/PKG-INFO +1 -1
  3. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/plots.py +14 -12
  4. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/read.py +1 -1
  5. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/lib/clas.py +1 -1
  6. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sectors/comp.py +5 -5
  7. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sectors/sect.py +2 -2
  8. {ellipsect-3.4.1 → ellipsect-3.4.3}/AUTHORS.rst +0 -0
  9. {ellipsect-3.4.1 → ellipsect-3.4.3}/CHANGELOG.rst +0 -0
  10. {ellipsect-3.4.1 → ellipsect-3.4.3}/CONTRIBUTING.rst +0 -0
  11. {ellipsect-3.4.1 → ellipsect-3.4.3}/LICENSE.txt +0 -0
  12. {ellipsect-3.4.1 → ellipsect-3.4.3}/README.rst +0 -0
  13. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/Makefile +0 -0
  14. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/_static/.gitignore +0 -0
  15. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/api.rst +0 -0
  16. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/authors.rst +0 -0
  17. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/changelog.rst +0 -0
  18. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/conf.py +0 -0
  19. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/contributing.rst +0 -0
  20. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/howto.rst +0 -0
  21. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/index.rst +0 -0
  22. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/license.rst +0 -0
  23. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/readme.rst +0 -0
  24. {ellipsect-3.4.1 → ellipsect-3.4.3}/docs/requirements.txt +0 -0
  25. {ellipsect-3.4.1 → ellipsect-3.4.3}/example/README +0 -0
  26. {ellipsect-3.4.1 → ellipsect-3.4.3}/example/gal.fits +0 -0
  27. {ellipsect-3.4.1 → ellipsect-3.4.3}/example/galfit.feedme +0 -0
  28. {ellipsect-3.4.1 → ellipsect-3.4.3}/example/psf.fits +0 -0
  29. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A2029.ring.png +0 -0
  30. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.comp.png +0 -0
  31. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.con-cub.png +0 -0
  32. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.cub.png +0 -0
  33. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.def.png +0 -0
  34. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.ell-cub.png +0 -0
  35. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.grid.png +0 -0
  36. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.log.png +0 -0
  37. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.pix.png +0 -0
  38. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.png +0 -0
  39. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.ranx1.png +0 -0
  40. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.ranx2.png +0 -0
  41. {ellipsect-3.4.1 → ellipsect-3.4.3}/img/A85.rany1.png +0 -0
  42. {ellipsect-3.4.1 → ellipsect-3.4.3}/pyproject.toml +0 -0
  43. {ellipsect-3.4.1 → ellipsect-3.4.3}/setup.cfg +0 -0
  44. {ellipsect-3.4.1 → ellipsect-3.4.3}/setup.py +0 -0
  45. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/SOURCES.txt +0 -0
  46. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/dependency_links.txt +0 -0
  47. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/entry_points.txt +0 -0
  48. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/not-zip-safe +0 -0
  49. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/requires.txt +0 -0
  50. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/EllipSect.egg-info/top_level.txt +0 -0
  51. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/__init__.py +0 -0
  52. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/ellipsectors.py +0 -0
  53. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/__init__.py +0 -0
  54. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/galfit.py +0 -0
  55. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/gfits.py +0 -0
  56. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/inout/prt.py +0 -0
  57. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/lib/__init__.py +0 -0
  58. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/lib/libs.py +0 -0
  59. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/phot/__init__.py +0 -0
  60. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/phot/ned.py +0 -0
  61. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/phot/phot.py +0 -0
  62. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/phot/tidal.py +0 -0
  63. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sectors/__init__.py +0 -0
  64. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sectors/ellip.py +0 -0
  65. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sectors/num.py +0 -0
  66. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sky/__init__.py +0 -0
  67. {ellipsect-3.4.1 → ellipsect-3.4.3}/src/ellipsect/sky/sky.py +0 -0
  68. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/conftest.py +0 -0
  69. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/gal.fits +0 -0
  70. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/galfit.01 +0 -0
  71. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/imgblock.fits +0 -0
  72. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/psf.fits +0 -0
  73. {ellipsect-3.4.1 → ellipsect-3.4.3}/tests/test_ellipsect.py +0 -0
  74. {ellipsect-3.4.1 → ellipsect-3.4.3}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EllipSect
3
- Version: 3.4.1
3
+ Version: 3.4.3
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EllipSect
3
- Version: 3.4.1
3
+ Version: 3.4.3
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
@@ -26,15 +26,16 @@ from ellipsect.inout.prt import PrintFilesComps
26
26
  from ellipsect.inout.galfit import conver2Sersic
27
27
  from ellipsect.inout.galfit import GetReff
28
28
 
29
- def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
29
+ def PlotSB(xradq, ysbq, ysberrq, xradm, ysbm, ysberrm, ellconf, scale):
30
30
  """ Produces final best-fitting plot """
31
31
 
32
32
  # subplot for arc sec axis
33
33
  plt.close('all')
34
34
 
35
35
 
36
+
36
37
  #ULISES begin
37
- fig, (axsec,axred) = plt.subplots(2, sharex=True, sharey=False)
38
+ #fig, (axsec, axred) = plt.subplots(2, sharex=True, sharey=False)
38
39
  gs = gridspec.GridSpec(2, 1,height_ratios=[3,1])
39
40
  gs.update(hspace=0.07)
40
41
  #ULISES end
@@ -62,11 +63,12 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
62
63
  axsec.set_ylabel(r"Surface Brightness $(mag\; arcsec^{-2})$")
63
64
  # ULISES end
64
65
 
65
- axsec.errorbar(xradq, ysbq,yerr=ysberrq,fmt='o-',capsize=2,color='red',markersize=0.7,label="galaxy",linewidth=2)
66
+ axsec.errorbar(xradq, ysbq, yerr=ysberrq,fmt='o-',capsize=2,color='red',markersize=0.7,label="galaxy",linewidth=2)
67
+ #axsec.plot(r, mgegal.sb[angal], 'C3-',linewidth=2)
66
68
 
67
69
 
68
70
  if ellconf.flagalax == False:
69
- axsec.errorbar(xradm, ysbm,yerr=ysberrm,fmt='o-',capsize=2,color='blue',markersize=0.7,label="Model",linewidth=2)
71
+ axsec.errorbar(xradm, ysbm, yerr=ysberrm,fmt='o-',capsize=2,color='blue',markersize=0.7,label="Model",linewidth=2)
70
72
 
71
73
 
72
74
  if ellconf.flagrany == True:
@@ -94,7 +96,6 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
94
96
  axsec.tick_params(which='major', length=7)
95
97
  axsec.tick_params(which='minor', length=4, color='r')
96
98
 
97
-
98
99
  #begin psf fwhm
99
100
  if ellconf.flagfwhm:
100
101
  xpos = ellconf.fwhm*scale
@@ -146,6 +147,7 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
146
147
 
147
148
  err = ((ysbm/ysbq**2)**2) * ysberrq**2 + ((1/ysbq)**2) * ysberrm**2
148
149
  err = np.sqrt(err)*100
150
+
149
151
  axred = plt.subplot(gs[1])
150
152
 
151
153
  if len(xradq) != len(residual):
@@ -159,7 +161,6 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
159
161
  axred.set_ylim(-2,2)
160
162
  # ULISES end
161
163
 
162
-
163
164
  if ellconf.flaglogx == True:
164
165
 
165
166
  axred.set_xscale("log")
@@ -235,7 +236,8 @@ def PlotSB(xradq,ysbq,ysberrq,xradm,ysbm,ysberrm,ellconf,scale):
235
236
  axred.spines[axis].set_linewidth(1.5)
236
237
 
237
238
 
238
- return xran,yran,axret
239
+
240
+ return xran, yran, axret
239
241
 
240
242
  #io/plot.py
241
243
  def PlotSub(xradq,ysbq,nsub,axsec,namec,colorval):
@@ -285,12 +287,13 @@ def Comp2Ellip(galhead, galcomps, N, lw=1):
285
287
  ellipses = []
286
288
 
287
289
  #color value
288
- values = range(N)
290
+ values = np.arange(N)
289
291
  jet = cm = plt.get_cmap('jet')
290
292
  cNorm = colors.Normalize(vmin=0, vmax=values[-1])
291
293
  scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=jet)
292
294
 
293
-
295
+
296
+ idxcol=0
294
297
  for idx, item in enumerate(galcomps.N):
295
298
 
296
299
  if galcomps.Active[idx] == True:
@@ -304,8 +307,7 @@ def Comp2Ellip(galhead, galcomps, N, lw=1):
304
307
  w = galcomps.Rad[idx]
305
308
  h = galcomps.Rad[idx]*galcomps.AxRat[idx]
306
309
 
307
-
308
- colorVal = scalarMap.to_rgba(values[idx])
310
+ colorVal = scalarMap.to_rgba(values[idxcol])
309
311
 
310
312
 
311
313
  ell=Ellipse((xc, yc), width = w, height = h, angle = pa,
@@ -314,7 +316,7 @@ def Comp2Ellip(galhead, galcomps, N, lw=1):
314
316
  linewidth = lw)
315
317
 
316
318
  ellipses.append(ell)
317
-
319
+ idxcol+=1
318
320
 
319
321
  return ellipses
320
322
 
@@ -78,7 +78,7 @@ def InitParsing():
78
78
  parser.add_argument("-r95","--rad95", action="store_true", help="Draw a vertical line indicating the 95%% of total light")
79
79
 
80
80
 
81
- parser.add_argument("-k","--keep", action="store_true", help="use existing file to compute subcomponents")
81
+ parser.add_argument("-rc","--remcomp", action="store_true", help="remove file of subcomponents")
82
82
  parser.add_argument("-gx","--galax", action="store_true", help="only the galaxy surface brightness is shown in the plot")
83
83
 
84
84
 
@@ -55,7 +55,7 @@ class EllipSectConfig:
55
55
  flagmodel=False
56
56
 
57
57
  flagsky=False
58
- flagkeep=False
58
+ flagkeep=True
59
59
  flagalax=False
60
60
 
61
61
  flagnedfile=False
@@ -28,7 +28,7 @@ def SubComp(ellconf, galhead, galcomps, sectcomps, axsec, n_sectors=19):
28
28
  N=len(galcomps.N)
29
29
 
30
30
  #color value
31
- values = range(N)
31
+ values = np.arange(N)
32
32
  jet = cm = plt.get_cmap('jet')
33
33
  cNorm = colors.Normalize(vmin=0, vmax=values[-1])
34
34
  scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=jet)
@@ -37,21 +37,21 @@ def SubComp(ellconf, galhead, galcomps, sectcomps, axsec, n_sectors=19):
37
37
  ab=ellconf.qarg
38
38
  n=0
39
39
 
40
+ idxcol=0
40
41
  maskcomp = galcomps.Active == True
41
42
  while(n<N):
42
43
 
43
-
44
44
  if galcomps.Active[n] == True:
45
45
  namec = galcomps.NameComp[n] #check if name coincide, it must be
46
46
 
47
- scmp = sectcomps[n]
47
+ scmp = sectcomps[idxcol]
48
48
 
49
49
 
50
50
  ###################################################
51
51
 
52
52
  xradq, ysbq, ysberrq = ellip.sect2xy(scmp, ellconf, galhead, n_sectors)
53
53
 
54
- colorVal = scalarMap.to_rgba(values[n])
54
+ colorVal = scalarMap.to_rgba(values[idxcol])
55
55
 
56
56
  PlotSub(xradq, ysbq, n, axsec, namec, colorVal)
57
57
 
@@ -62,7 +62,7 @@ def SubComp(ellconf, galhead, galcomps, sectcomps, axsec, n_sectors=19):
62
62
 
63
63
  PrintEllFilesComps(ellconf, galhead, namec, ncomp, xradq, ysbq, ysberrq)
64
64
 
65
-
65
+ idxcol+=1
66
66
  n=n+1
67
67
 
68
68
 
@@ -632,8 +632,8 @@ def PassArgs(args):
632
632
  if args.snr:
633
633
  ellconf.flagsnr=True
634
634
 
635
- if args.keep:
636
- ellconf.flagkeep=True
635
+ if args.remcomp:
636
+ ellconf.flagkeep=False
637
637
 
638
638
  if args.galax:
639
639
  ellconf.flagalax=True
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
File without changes