Skip to content

Instantly share code, notes, and snippets.

@wkerzendorf
Created June 12, 2015 21:51
Show Gist options
  • Save wkerzendorf/47fd23359bc95c225551 to your computer and use it in GitHub Desktop.
Save wkerzendorf/47fd23359bc95c225551 to your computer and use it in GitHub Desktop.
Idea for Echelle Model
class IRCSEchelle(Model):
inputs = ()
outputs = ('polygon_array', )
slit_width = Parameter(default=5.)
slit_length = Parameter(default=10.)
def evaluate(self, slit_width, slit_length, ...):
parray = run_idl_code(slit_width, slit_length)
return parray
class Slicer(Model):
inputs = ('polygon_array')
outputs = ('mask')
def evaluate(self, parray):
return your_code_that_generates_mask(parray)
if __name__ = '__main__':
echelle = IRCSEchelle()
echelle()
echelle.slit_width = 20.
echelle()
new_echelle = echelle | Slicer()
new_echelle.slit_width_0 = 5
new_echelle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment