Created
          October 28, 2013 18:18 
        
      - 
      
- 
        Save wkerzendorf/7201828 to your computer and use it in GitHub Desktop. 
    specwcs using new modeling class - error
Look at branch: https://github.com/wkerzendorf/specutils/blob/specwcs_update/specutils/wcs/specwcs.py
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ERROR: AttributeError: 'Spectrum1DLookupWCS' object has no attribute '_param_dim' [astropy.modeling.core] | |
| --------------------------------------------------------------------------- | |
| AttributeError Traceback (most recent call last) | |
| <ipython-input-3-01a2fdaa6cd5> in <module>() | |
| ----> 1 specwcs.Spectrum1DLookupWCS(np.arange(3000, 6000) * u.Angstrom) | |
| /Users/wkerzend/scripts/python/specutils/specutils/wcs/specwcs.py in __init__(self, lookup_table, unit, lookup_table_interpolation_kind) | |
| 60 self.lookup_table_parameter = lookup_table * unit | |
| 61 elif unit is None: # lookup_table is already unit'd | |
| ---> 62 self.lookup_table_parameter = lookup_table | |
| 63 | |
| 64 self.lookup_table_interpolation_kind = lookup_table_interpolation_kind | |
| /Users/wkerzend/scripts/python/astropy/build/lib.macosx-10.9-intel-2.7/astropy/modeling/parameters.pyc in __set__(self, obj, value) | |
| 153 | |
| 154 def __set__(self, obj, value): | |
| --> 155 value, shape = self._validate_value(obj, value) | |
| 156 # Compare the shape against the previous value's shape, if it exists | |
| 157 if hasattr(obj, self._attr): | |
| /Users/wkerzend/scripts/python/astropy/build/lib.macosx-10.9-intel-2.7/astropy/modeling/parameters.pyc in _validate_value(self, model, value) | |
| 410 return | |
| 411 | |
| --> 412 param_dim = model.param_dim | |
| 413 if param_dim == 1: | |
| 414 # Just validate the value with _tofloat | |
| /Users/wkerzend/scripts/python/astropy/build/lib.macosx-10.9-intel-2.7/astropy/modeling/core.pyc in param_dim(self) | |
| 185 """Number of parameter sets in a model.""" | |
| 186 | |
| --> 187 return self._param_dim | |
| 188 | |
| 189 def __repr__(self): | |
| AttributeError: 'Spectrum1DLookupWCS' object has no attribute '_param_dim' | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment