Skip to content

Commit

Permalink
Use host_specz instead of the true redshift
Browse files Browse the repository at this point in the history
zenodo has additional information for PLAsTiCC that we don't want to be
using.
  • Loading branch information
kboone committed May 14, 2019
1 parent c448ed1 commit 96a216c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions avocado/augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class Augmentor():
- For extragalactic observations, adjust the redshift.
- Add noise.
When changing the redshift, we use the host_specz measurement as the
redshift of the reference object. While in simulations we might know the
true redshift, that isn't the case for real experiments.
The augmentor needs to have some reasonable idea of the properties of the
survey that it is being applied to. If there is a large dataset that the
classifier will be used on, then that dataset can be used directly to
Expand Down Expand Up @@ -153,7 +157,7 @@ def _choose_sampling_times(self, reference_object, augmented_metadata,

# If the redshift changed, shift the time of the observations.
augmented_redshift = augmented_metadata['redshift']
reference_redshift = reference_object.metadata['redshift']
reference_redshift = reference_object.metadata['host_specz']
redshift_scale = (1 + augmented_redshift) / (1 + reference_redshift)

if augmented_redshift != reference_redshift:
Expand Down Expand Up @@ -370,7 +374,7 @@ def _resample_light_curve(self, reference_object, augmented_metadata):
# Compute the fluxes from the GP at the augmented observation
# times.
new_redshift = augmented_metadata['redshift']
reference_redshift = reference_object.metadata['redshift']
reference_redshift = reference_object.metadata['host_specz']
redshift_scale = (1 + new_redshift) / (1 + reference_redshift)

new_wavelengths = np.array([band_central_wavelengths[i] for i in
Expand Down

0 comments on commit 96a216c

Please sign in to comment.