Created
June 12, 2015 21:51
-
-
Save wkerzendorf/47fd23359bc95c225551 to your computer and use it in GitHub Desktop.
Idea for Echelle Model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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