Paste #2146
diff -r 9d72d2c6f211 yt/data_objects/static_output.py
| 91 | 91 | |
|---|---|---|
| 92 | 92 | self._parse_parameter_file() |
| 93 | 93 | self._set_units() |
| 94 | self._set_derived_attrs() | |
| 94 | 95 | |
| 95 | 96 | # Because we need an instantiated class to check the pf's existence in |
| 96 | 97 | # the cache, we move that check to here from __new__. This avoids |
| … | ||
| 103 | 104 | |
| 104 | 105 | self.create_field_info() |
| 105 | 106 | |
| 107 | def _set_derived_attrs(self): | |
| 108 | self.center = 0.5*(self.domain_right_edge + self.domain_left_edge) | |
| 109 | self.width = self.domain_right_edge - self.domain_left_edge | |
| 110 | ||
| 106 | 111 | def __reduce__(self): |
| 107 | 112 | args = (self._hash(),) |
| 108 | 113 | return (_reconstruct_pf, args) |