Commit 17366f6bec07524ae144b50853e45afd9279f46f
Committed by
Jürgen Knödlseder
1 parent
5aefd899
Added members _reg_width, _reg_height, _reg_posang to csphagen class. Adjusted g…
…et_state and set_state methods.
Showing
1 changed file
with
10 additions
and
1 deletions
cscripts/csphagen.py
| @@ -54,6 +54,9 @@ class csphagen(ctools.csobservation): | @@ -54,6 +54,9 @@ class csphagen(ctools.csobservation): | ||
| 54 | self._has_exclusion = False | 54 | self._has_exclusion = False |
| 55 | self._srcshape = '' | 55 | self._srcshape = '' |
| 56 | self._rad = 0.0 | 56 | self._rad = 0.0 |
| 57 | + self._reg_width = 0.0 | ||
| 58 | + self._reg_height = 0.0 | ||
| 59 | + self._reg_posang = 0.0 | ||
| 57 | self._nthreads = 0 | 60 | self._nthreads = 0 |
| 58 | 61 | ||
| 59 | # Return | 62 | # Return |
| @@ -82,6 +85,9 @@ class csphagen(ctools.csobservation): | @@ -82,6 +85,9 @@ class csphagen(ctools.csobservation): | ||
| 82 | 'has_exclusion' : self._has_exclusion, | 85 | 'has_exclusion' : self._has_exclusion, |
| 83 | 'srcshape' : self._srcshape, | 86 | 'srcshape' : self._srcshape, |
| 84 | 'rad' : self._rad, | 87 | 'rad' : self._rad, |
| 88 | + 'reg_width' : self._reg_width, | ||
| 89 | + 'reg_height' : self._reg_height, | ||
| 90 | + 'reg_posang' : self._reg_posang, | ||
| 85 | 'nthreads' : self._nthreads} | 91 | 'nthreads' : self._nthreads} |
| 86 | 92 | ||
| 87 | # Return pickled dictionary | 93 | # Return pickled dictionary |
| @@ -108,6 +114,9 @@ class csphagen(ctools.csobservation): | @@ -108,6 +114,9 @@ class csphagen(ctools.csobservation): | ||
| 108 | self._has_exclusion = state['has_exclusion'] | 114 | self._has_exclusion = state['has_exclusion'] |
| 109 | self._srcshape = state['srcshape'] | 115 | self._srcshape = state['srcshape'] |
| 110 | self._rad = state['rad'] | 116 | self._rad = state['rad'] |
| 117 | + self._reg_width = state['reg_width'] | ||
| 118 | + self._reg_height = state['reg_height'] | ||
| 119 | + self._reg_posang = state['reg_posang'] | ||
| 111 | self._nthreads = state['nthreads'] | 120 | self._nthreads = state['nthreads'] |
| 112 | 121 | ||
| 113 | # Return | 122 | # Return |
| @@ -830,7 +839,7 @@ class csphagen(ctools.csobservation): | @@ -830,7 +839,7 @@ class csphagen(ctools.csobservation): | ||
| 830 | return | 839 | return |
| 831 | 840 | ||
| 832 | def save(self): | 841 | def save(self): |
| 833 | - """ | 842 | + """ |
| 834 | Save data | 843 | Save data |
| 835 | """ | 844 | """ |
| 836 | # Write header | 845 | # Write header |