astra.contrib.thepayne.test¶
Module Contents¶
Functions¶
_predict_stellar_spectrum(unscaled_labels, weights, biases) |
|
_redshift(dispersion, flux, radial_velocity) |
|
load_state(path) |
|
test(wavelength, flux, ivar, neural_network_coefficients, scales, model_wavelength, label_names, initial_labels=None, radial_velocity_tolerance=None, **kwargs) |
Use a pre-trained neural network to estimate the stellar labels for the given spectrum. |
get_chi_sq(expectation, y, y_err, L) |
-
astra.contrib.thepayne.test.LARGE= 1000.0¶
-
astra.contrib.thepayne.test.c¶
-
astra.contrib.thepayne.test.sigmoid¶
-
astra.contrib.thepayne.test._predict_stellar_spectrum(unscaled_labels, weights, biases)¶
-
astra.contrib.thepayne.test._redshift(dispersion, flux, radial_velocity)¶
-
astra.contrib.thepayne.test.load_state(path)¶
-
astra.contrib.thepayne.test.test(wavelength, flux, ivar, neural_network_coefficients, scales, model_wavelength, label_names, initial_labels=None, radial_velocity_tolerance=None, **kwargs)¶ Use a pre-trained neural network to estimate the stellar labels for the given spectrum.
Parameters: - wavelength – The wavelength array of the observed spectrum.
- flux – The observed (or pseudo-continuum-normalised) fluxes.
- ivar – The inverse variances of the fluxes.
- neural_network_coefficients – A two-length tuple containing the weights of the neural network, and the biases.
- scales – The lower and upper scaling value used for the labels.
- initial_labels – [optional] The initial labels to optimize from. By default this will be set at the center of the training set labels.
- radial_velocity_tolerance – [optional]
Supply a radial velocity tolerance to fit simulatenously with stellar parameters. If
Noneis given then no radial velocity will be fit. If a float/integer is given then any radial velocity +/- that value will be considered. Alternatively, a (lower, upper) bound can be given.
Returns: A three-length tuple containing the optimized parameters, the covariance matrix, and a metadata dictionary.
-
astra.contrib.thepayne.test.get_chi_sq(expectation, y, y_err, L)¶