Changeset 197:93f89e9049be for src/mlx/config.py
- Timestamp:
- 05/27/12 11:15:19 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r183 r197 126 126 self._syncFSTime = False 127 127 self._usingFS2Crew = False 128 self._iasSmoothingLength = -2 129 self._vsSmoothingLength = -2 128 130 129 131 self._pirepDirectory = None … … 273 275 if usingFS2Crew!=self._usingFS2Crew: 274 276 self._usingFS2Crew = usingFS2Crew 277 self._modified = True 278 279 @property 280 def iasSmoothingLength(self): 281 """Get the number of samples over which the IAS is averaged for the 282 smoothed IAS calculation. It may be negative, in which case smoothing 283 is disabled, but we nevertheless store the number of seconds in case it 284 may become useful later.""" 285 return self._iasSmoothingLength 286 287 @property 288 def realIASSmoothingLength(self): 289 """Get the real smoothing length of IAS.""" 290 return max(self._iasSmoothingLength, 1) 291 292 @iasSmoothingLength.setter 293 def iasSmoothingLength(self, iasSmoothingLength): 294 """Set the number of samples over which the IAS is averaged for the 295 smoothed IAS calculation.""" 296 if iasSmoothingLength!=self._iasSmoothingLength: 297 self._iasSmoothingLength = iasSmoothingLength 298 self._modified = True 299 300 @property 301 def vsSmoothingLength(self): 302 """Get the number of samples over which the VS is averaged for the 303 smoothed VS calculation. It may be negative, in which case smoothing 304 is disabled, but we nevertheless store the number of seconds in case it 305 may become useful later.""" 306 return self._vsSmoothingLength 307 308 @property 309 def realVSSmoothingLength(self): 310 """Get the real smoothing length of VS.""" 311 return max(self._vsSmoothingLength, 1) 312 313 @vsSmoothingLength.setter 314 def vsSmoothingLength(self, vsSmoothingLength): 315 """Set the number of samples over which the VS is averaged for the 316 smoothed VS calculation.""" 317 if vsSmoothingLength!=self._vsSmoothingLength: 318 self._vsSmoothingLength = vsSmoothingLength 275 319 self._modified = True 276 320 … … 455 499 "usingFS2Crew", 456 500 False) 501 self._iasSmoothingLength = int(self._get(config, "general", 502 "iasSmoothingLength", 503 -2)) 504 self._vsSmoothingLength = int(self._get(config, "general", 505 "vsSmoothingLength", 506 -2)) 457 507 self._pirepDirectory = self._get(config, "general", 458 508 "pirepDirectory", None) … … 517 567 config.set("general", "usingFS2Crew", 518 568 "yes" if self._usingFS2Crew else "no") 569 config.set("general", "iasSmoothingLength", 570 str(self._iasSmoothingLength)) 571 config.set("general", "vsSmoothingLength", 572 str(self._vsSmoothingLength)) 519 573 520 574 if self._pirepDirectory is not None:
Note:
See TracChangeset
for help on using the changeset viewer.