Ejemplo n.º 1
0
                def OnClick(self, event):
                    #Extract parameters for simulation run:
                    cubefile = str(self.INPUTCUBEVAL.GetPath())
                    ditval = float(self.DITVAL.GetValue())
                    nditval = float(self.NDITVAL.GetValue())
                    photoband = str(
                        self.PHOTOBANDVAL.GetStringSelection()).split(' ')[0]
                    ignorespecval = str(self.IGNORESPECVAL.GetValue())
                    if ignorespecval == 'True':
                        ignoreLSF = True
                    elif ignorespecval == 'False':
                        ignoreLSF = False
                    resjitval = float(self.RESJITVAL.GetValue())
                    # sitetempval = float(self.SITETEMPVAL.GetValue())
                    sitetempval = 1.0
                    noiseseedval = self.NOISESEEDVAL.GetStringSelection()
                    if noiseseedval == 'Random':
                        noiseseedval = 0.
                    setrchoice = self.SETRVAL.GetValue()
                    if setrchoice:
                        spec_nyq = False
                        setrval = float(setrchoice)
                    elif not setrchoice:
                        spec_nyq = True
                        setrval = 1.
                    remove_bgval = str(self.REMOVE_BGVAL.GetValue())
                    return_obval = str(self.OUTPUT_OBVAL.GetValue())
                    return_tsval = str(self.OUTPUT_TSVAL.GetValue())
                    drizzle = str(self.DRIZZLEVAL.GetValue())
                    if drizzle == 'True':
                        drizzleval = True
                    elif drizzle == 'False':
                        drizzleval = False
                    nprocs = int(self.N_PROCVAL.GetValue())
                    odir = str(self.DIRVAL.GetPath())
                    combnditsval = True

                    print 'Filename: ', cubefile
                    print 'DIT = ', ditval
                    print 'NINT = ', nditval
                    print 'Grating = ', photoband
                    print 'Ignore LSF conv?', ignorespecval
                    print 'Residual jitter = ', resjitval
                    print 'Temperature = ', sitetempval
                    print 'Noise seed = ', noiseseedval
                    print 'Spectral Nyquist sampling? ', spec_nyq
                    print 'Subtract background? ', remove_bgval
                    print 'Return object cube? ', return_obval
                    print 'Return transmission? ', return_tsval
                    print 'Drizzle?', drizzleval
                    print 'No. of processors = ', nprocs
                    print 'Output directory = ', odir

                    #start main program
                    main(cubefile, odir, ditval, nditval, photoband, ignoreLSF,
                         resjitval, sitetempval, combnditsval, spec_nyq,
                         setrval, noiseseedval, remove_bgval, return_obval,
                         return_tsval, drizzleval, ver, nprocs)
Ejemplo n.º 2
0
                def OnClick(self,event):
                    #Extract parameters for simulation run:
                    cubefile = str(self.INPUTCUBEVAL.GetPath())
                    ditval = float(self.DITVAL.GetValue())
                    nditval = float(self.NDITVAL.GetValue())
                    photoband = str(self.PHOTOBANDVAL.GetStringSelection()).split(' ')[0]
                    ignorespecval = str(self.IGNORESPECVAL.GetValue())
                    if ignorespecval == 'True':
                        ignoreLSF = True
                    elif ignorespecval == 'False':
                        ignoreLSF = False
                    resjitval = float(self.RESJITVAL.GetValue())
                    # sitetempval = float(self.SITETEMPVAL.GetValue())
                    sitetempval = 1.0
                    noiseseedval = self.NOISESEEDVAL.GetStringSelection()
                    if noiseseedval == 'Random':
                        noiseseedval = 0.
                    setrchoice = self.SETRVAL.GetValue()
                    if setrchoice:
                        spec_nyq = False
                        setrval = float(setrchoice)
                    elif not setrchoice:
                        spec_nyq = True
                        setrval = 1.
                    remove_bgval = str(self.REMOVE_BGVAL.GetValue())
                    return_obval = str(self.OUTPUT_OBVAL.GetValue())
                    return_tsval = str(self.OUTPUT_TSVAL.GetValue())
                    drizzle = str(self.DRIZZLEVAL.GetValue())
                    if drizzle == 'True':
                        drizzleval = True
                    elif drizzle == 'False':
                        drizzleval = False
                    nprocs = int(self.N_PROCVAL.GetValue())
                    odir = str(self.DIRVAL.GetPath())
                    combnditsval=True

                    print 'Filename: ', cubefile
                    print 'DIT = ', ditval
                    print 'NINT = ', nditval
                    print 'Grating = ', photoband
                    print 'Ignore LSF conv?', ignorespecval
                    print 'Residual jitter = ', resjitval
                    print 'Temperature = ', sitetempval
                    print 'Noise seed = ', noiseseedval
                    print 'Spectral Nyquist sampling? ', spec_nyq
                    print 'Subtract background? ', remove_bgval
                    print 'Return object cube? ', return_obval
                    print 'Return transmission? ', return_tsval
                    print 'Drizzle?', drizzleval
                    print 'No. of processors = ', nprocs
                    print 'Output directory = ', odir

                    #start main program
                    main(cubefile, odir, ditval, nditval, photoband,
                    ignoreLSF, resjitval, sitetempval,
                    combnditsval, spec_nyq, setrval, noiseseedval,
                    remove_bgval, return_obval, return_tsval, drizzleval,
                    ver, nprocs)
Ejemplo n.º 3
0
                spec_N = True
            elif spec_Nyquist == 'False':
                spec_N = False
            Spec_samp = float(args[7])
            noise_force_seed = int(float(args[8]))
            remove_background = args[9]
            return_obj = args[10]
            return_tra = args[11]
            drizzle = args[12]
            if drizzle == 'True':
                drizzleval = True
            elif drizzle == 'False':
                drizzleval = False
            #Start main function
            main(datacube, odir, DIT, NDIT, grat, ignoreLSF, res_jitter,
                 site_temp, combine_ndits, spec_N, Spec_samp, noise_force_seed,
                 remove_background, return_obj, return_tra, drizzleval, ver,
                 nprocs)

    #Use GUI interface if no command line option
    wxfound = 0
    if len(optlist) == 0 and len(args) == 0:
        try:
            import wx
            wxfound = 1

            class Form1(wx.Frame):
                def __init__(self, parent, title):
                    super(Form1, self).__init__(parent,
                                                title=title,
                                                size=(850, 390))
Ejemplo n.º 4
0
                spec_N = True
            elif spec_Nyquist == 'False':
                spec_N = False
            Spec_samp = float(args[7])
            noise_force_seed = int(float(args[8]))
            remove_background = args[9]
            return_obj = args[10]
            return_tra = args[11]
            drizzle = args[12]
            if drizzle == 'True':
                drizzleval = True
            elif drizzle == 'False':
                drizzleval = False
            #Start main function
            main(datacube, odir, DIT, NDIT, grat, ignoreLSF, res_jitter,
                 site_temp, combine_ndits, spec_N, Spec_samp, noise_force_seed,
                 remove_background, return_obj, return_tra, drizzleval, ver, nprocs)

    #Use GUI interface if no command line option
    wxfound = 0
    if len(optlist) == 0 and len(args) == 0:
        try:
            import wx
            wxfound = 1
            class Form1(wx.Frame):

                def __init__(self, parent, title):
                    super(Form1, self).__init__(parent, title=title,
                        size=(850, 390))

                    self.InitUI()