section=section, units=units, pixfrac=pixfrac, prodonly=prodonly, bits_final=_bits_final, bits_single=_bits_single, wt_scl=wt_scl, in_units=in_units, fillval=fillval, idckey=idckey) drobj.run(save=save, build=build, single=single, clean=clean) # Remove intermediate files #if clean == yes: # drobj.clean() # Setup PyDrizzle as an IRAF task here # by setting up an absolute path to the parfile... #_ospath = os.path # File that gets picked up here is: iraffunctions.py #_abspath = _ospath.split(_ospath.abspath(__file__))[0] #parfile = os.path.join(_abspath,'pydrizzle.par') parfile = iraf.osfn(_parfile) pyd = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=pydriz_iraf) iraf.pydrizzle.version = pydrizzle.__version__
mask = False # check whether there is something to start if grism != None and config != None: axesrc.backest(grism=grism, config=config, np=np, interp=interp, niter_med=niter_med, niter_fit=niter_fit, kappa=kappa, smooth_length=smooth_length, smooth_fwhm=smooth_fwhm, old_bck=old_bck, mask=mask, in_af=in_af, out_bck=out_back) else: # print the help iraf.help(_taskname) # Initialize IRAF Task definition now... parfile = iraf.osfn(_parfile) a = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=backest_iraf)
backgr = True else: backgr = False if norm == yes: norm = True else: norm = False if gcorr == yes: gcorr = True else: gcorr = False # check whether something should be done if inlist != None and configs != None: # call the main function axesrc.axeprep(inlist=inlist, configs=configs, backgr=backgr, backims=backims, backped=backped, mfwhm=mfwhm, norm=norm, gcorr=gcorr) else: # print the help iraf.help(_taskname) parfile = iraf.osfn(_parfile) multid = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=axeprep_iraf)
###### # Set up Python IRAF interface here ###### def prepimages_iraf(inlist, model_images=None): # properly format the strings inlist = axesrc.straighten_string(inlist) model_images = axesrc.straighten_string(model_images) # check for minimal input if inlist == None: # print the help iraf.help(_taskname) # if there is enough input else: # execute the python function axesrc.prepimages(inlist=inlist, model_images=model_images) # Initialize IRAF Task definition now... parfile = iraf.osfn(_parfile) a = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=prepimages_iraf)
###### # Set up Python IRAF interface here ###### def XYtoSky_iraf(input,x=None,y=None,coords=None,colnames=None,linear=yes, idckey='IDCTAB',hms=no,output=None,ra=None,dec=None, verbose=yes): # Transform IRAF empty parameters to Python None when expected. if coords == '': coords = None if colnames == '': colnames = None if idckey == '': idckey = None if output == '': output = None if not coords and x == None: print('Please specify either a single position or a file with positions.') return ra,dec = xytosky.XYtoSky_pars(input,x=x,y=y,coords=coords,colnames=colnames, linear=linear,idckey=idckey,hms=hms, output=output,verbose=verbose) # Update IRAF parameters with new values if not coords: iraf.xytosky.ra = ra[0] iraf.xytosky.dec = dec[0] # Setup PyDrizzle as an IRAF task here parfile = iraf.osfn(_parfile) xys = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=XYtoSky_iraf)
calcos.calcos(input, outdir=outdir, verbosity=verbosity, find_target={ "flag": find_target, "cutoff": cutoff }, create_csum_image=csum, raw_csum_coords=raw_csum, binx=binx, biny=biny, compress_csum=compress, compression_parameters=comp_param, shift_file=shift_file, save_temp_files=savetmp, stimfile=stimfile, livetimefile=livefile, burstfile=burstfile) # Initialize IRAF Task definition now... parfile = iraf.osfn(_parfile) runcal = iraf.IrafTaskFactory(taskname=_taskname, value=parfile, pkgname=PkgName, pkgbinary=PkgBinary, function=calcos_iraf) iraf.calcos.version = _version