@@ -28,12 +28,12 @@ class MorphRGrid(Morph):
2828
2929 Configuration Variables
3030 -----------------------
31- rmin
32- The lower-bound on the r -range.
33- rmax
34- The upper-bound on the r -range (exclusive within tolerance of 1e-8).
35- rstep
36- The r -spacing.
31+ xmin
32+ The lower-bound on the x -range.
33+ xmax
34+ The upper-bound on the x -range (exclusive within tolerance of 1e-8).
35+ xstep
36+ The x -spacing.
3737
3838 Notes
3939 -----
@@ -49,47 +49,47 @@ class MorphRGrid(Morph):
4949 yinlabel = LABEL_GR
5050 xoutlabel = LABEL_RA
5151 youtlabel = LABEL_GR
52- parnames = ["rmin " , "rmax " , "rstep " ]
52+ parnames = ["xmin " , "xmax " , "xstep " ]
5353
54- # Define rmin rmax holders for adaptive x-grid refinement
54+ # Define xmin xmax holders for adaptive x-grid refinement
5555 # Without these, the program r-grid can only decrease in interval size
56- rmin_origin = None
57- rmax_origin = None
58- rstep_origin = None
56+ xmin_origin = None
57+ xmax_origin = None
58+ xstep_origin = None
5959
6060 def morph (self , x_morph , y_morph , x_target , y_target ):
6161 """Resample arrays onto specified grid."""
62- if self .rmin is not None :
63- self .rmin_origin = self .rmin
64- if self .rmax is not None :
65- self .rmax_origin = self .rmax
66- if self .rstep is not None :
67- self .rstep_origin = self .rstep
62+ if self .xmin is not None :
63+ self .xmin_origin = self .xmin
64+ if self .xmax is not None :
65+ self .xmax_origin = self .xmax
66+ if self .xstep is not None :
67+ self .xstep_origin = self .xstep
6868
6969 Morph .morph (self , x_morph , y_morph , x_target , y_target )
70- rmininc = max (min (self .x_target_in ), min (self .x_morph_in ))
71- r_step_target = (max (self .x_target_in ) - min (self .x_target_in )) / (
70+ xmininc = max (min (self .x_target_in ), min (self .x_morph_in ))
71+ x_step_target = (max (self .x_target_in ) - min (self .x_target_in )) / (
7272 len (self .x_target_in ) - 1
7373 )
74- r_step_morph = (max (self .x_morph_in ) - min (self .x_morph_in )) / (
74+ x_step_morph = (max (self .x_morph_in ) - min (self .x_morph_in )) / (
7575 len (self .x_morph_in ) - 1
7676 )
77- rstepinc = max (r_step_target , r_step_morph )
78- rmaxinc = min (
79- max (self .x_target_in ) + r_step_target ,
80- max (self .x_morph_in ) + r_step_morph ,
77+ xstepinc = max (x_step_target , x_step_morph )
78+ xmaxinc = min (
79+ max (self .x_target_in ) + x_step_target ,
80+ max (self .x_morph_in ) + x_step_morph ,
8181 )
82- if self .rmin_origin is None or self .rmin_origin < rmininc :
83- self .rmin = rmininc
84- if self .rmax_origin is None or self .rmax_origin > rmaxinc :
85- self .rmax = rmaxinc
86- if self .rstep_origin is None or self .rstep_origin < rstepinc :
87- self .rstep = rstepinc
82+ if self .xmin_origin is None or self .xmin_origin < xmininc :
83+ self .xmin = xmininc
84+ if self .xmax_origin is None or self .xmax_origin > xmaxinc :
85+ self .xmax = xmaxinc
86+ if self .xstep_origin is None or self .xstep_origin < xstepinc :
87+ self .xstep = xstepinc
8888 # roundoff tolerance for selecting bounds on arrays.
89- epsilon = self .rstep / 2
90- # Make sure that rmax is exclusive
89+ epsilon = self .xstep / 2
90+ # Make sure that xmax is exclusive
9191 self .x_morph_out = numpy .arange (
92- self .rmin , self .rmax - epsilon , self .rstep
92+ self .xmin , self .xmax - epsilon , self .xstep
9393 )
9494 self .y_morph_out = numpy .interp (
9595 self .x_morph_out , self .x_morph_in , self .y_morph_in
0 commit comments