Skip to content

Instantly share code, notes, and snippets.

@wkerzendorf
Created November 14, 2013 18:46
Show Gist options
  • Save wkerzendorf/7472208 to your computer and use it in GitHub Desktop.
Save wkerzendorf/7472208 to your computer and use it in GitHub Desktop.
Mutlispec WCS for 2 dimensional
class MultiSpecWCS(Model):
def __init__(self, single_wcs=[list of 1d WCSs]):
self.single_wcs = single_wcs
def __call__(self, x, y):
assert type(x) == int # we need to make sure that the user does not expect to interpolate between two adjacent spectra
return self.single_wcs[x](y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment