Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error #51

Open
Tawhia opened this issue May 8, 2017 · 0 comments
Open

Error #51

Tawhia opened this issue May 8, 2017 · 0 comments

Comments

@Tawhia
Copy link

Tawhia commented May 8, 2017

i tried to run the first example from documantation and i got an Error:

 ------------------------------------------------------------
  => Model parameters
 ------------------------------------------------------------

   Models              :  YSO models
   Log[d] stepping     :  0.01
   Number of distances :  61

 ------------------------------------------------------------
  => Reading in convolved fluxes
 ------------------------------------------------------------

   Reading models\models_r06/convolved/2J.fits
WARNING: VerifyWarning: Error validating header for HDU #2 (note: Astropy uses zero-based indexing).
    'ascii' codec can't decode byte 0xf8 in position 2: ordinal not in range(128)
There may be extra bytes after the last HDU or the file is corrupted. [astropy.io.fits.hdu.hdulist]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-8-ea2c0add5650> in <module>()
     21     'output.fitinfo',
     22     extinction_law=extinction,
---> 23     distance_range=[1., 4.] * u.kpc)

C:\Users\Karolina\Desktop\sedfitter\sedfitter\fit.py in fit(data, filter_names, apertures, model_dir, output, n_data_min, extinction_law, av_range, distance_range, output_format, output_convolved, remove_resolved)
    177                     extinction_law=extinction_law, av_range=av_range,
    178                     distance_range=distance_range,
--> 179                     remove_resolved=remove_resolved)
    180 
    181     print(" ------------------------------------------------------------")

C:\Users\Karolina\Desktop\sedfitter\sedfitter\fit.py in __init__(self, filter_names, apertures, model_dir, extinction_law, av_range, distance_range, remove_resolved)
     83 
     84         # Read in models
---> 85         self.models = Models.read(model_dir, self.filters, distance_range=distance_range, remove_resolved=remove_resolved)
     86 
     87         # Add wavelength to filters

C:\Users\Karolina\Desktop\sedfitter\sedfitter\models.py in read(cls, directory, filters, distance_range, remove_resolved)
    140             return cls._read_version_1(directory, filters,
    141                                        distance_range=distance_range,
--> 142                                        remove_resolved=remove_resolved)
    143         else:
    144             return cls._read_version_2(directory, filters,

C:\Users\Karolina\Desktop\sedfitter\sedfitter\models.py in _read_version_1(cls, directory, filters, distance_range, remove_resolved)
    196             print("   Reading " + filename)
    197 
--> 198             conv = ConvolvedFluxes.read(filename)
    199 
    200             if ifilt == 0:

C:\Users\Karolina\Desktop\sedfitter\sedfitter\convolved_fluxes\convolved_fluxes.py in read(cls, filename)
    228             conv.flux = tc['TOTAL_FLUX'].data.reshape(tc['TOTAL_FLUX'].shape[0], 1) * tc['TOTAL_FLUX'].unit
    229         else:
--> 230             conv.flux = tc['TOTAL_FLUX'].data * tc['TOTAL_FLUX'].unit
    231 
    232         if tc['TOTAL_FLUX_ERR'].ndim == 1 and conv.n_ap == 1:

C:\Users\Karolina\Desktop\sedfitter\sedfitter\convolved_fluxes\convolved_fluxes.py in flux(self, value)
    114             self._flux = validate_array('flux', value, ndim=2,
    115                                         shape=(self.n_models, self.n_ap),
--> 116                                         physical_type=('power', 'flux', 'spectral flux density'))
    117 
    118     @property

C:\Users\Karolina\Desktop\sedfitter\sedfitter\utils\validator.py in validate_array(name, value, domain, ndim, shape, physical_type)
     66             raise ValueError("{0} has incorrect length (expected {1} but found {2})".format(name, shape[0], value.shape[0]))
     67         else:
---> 68             raise ValueError("{0} has incorrect shape (expected {1} but found {2})".format(name, shape, value.shape))
     69 
     70     return value

ValueError: flux has incorrect shape (expected (200710, 1) but found (200710, 50))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant