Welcome to iraf.net Friday, April 19 2024 @ 02:34 PM GMT


 Forum Index > Help Desk > Python New Topic Post Reply
 PyRAF darkcombine
   
mshemuni
 10/29/2016 06:43PM (Read 1325 times)  
+----
Newbie

Status: offline


Registered: 03/11/2014
Posts: 7
I'm trying to create a Python script.
I wrote my classes and methods. But getting an error says:

IRAF task terminated abnormally
ERROR (601, "Parameter not a legal boolean (try 'yes' or 'no') (subsets)")


PHP Formatted Code
class fits_operation():

    def __init__(self, verb=True):
        self.verb = verb
        self.meetc = myEnv.etc(verb=self.verb)
        self.mefo = myEnv.file_operation(verb=self.verb)
        self.ho = header_operation(verb=self.verb)

    def darkcombine(self, file_list, out_file, combine="median",
        reject="minmax", scale="exposure", ccdtype=""):
        ret = False
        files = self.meetc.join_list_items_to_string(file_list)
        if files[0]:
            dc.input = files[1]
            dc.output = out_file
            dc.combine = combine
            dc.reject = reject
            dc.ccdtype = ccdtype
            dc.scale = scale
            dc.process = "no"
            try:
                dc._runCode()
                ret = True
            except Exception as e:
                self.meetc.print_if(e)
 


Here my inputs:
files[1]: "/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010V.fit"
out_file: "/home/msh/Desktop/dark.fit"
combine: "average"
reject: "minmax"
ccdtype: ""
scale: "exposure"


I tried to use iraf itself. I was able to create master dark.
Same, I was able to create the master dark using directly pyraf.

Why I get such en error. There is no parameter as subsets in darkcombine. What's wrong?

 
Profile Email
 Quote
mshemuni
 11/01/2016 06:52AM  
+----
Newbie

Status: offline


Registered: 03/11/2014
Posts: 7
Quote by: mshemuni

I'm trying to create a Python script.
I wrote my classes and methods. But getting an error says:

IRAF task terminated abnormally
ERROR (601, "Parameter not a legal boolean (try 'yes' or 'no') (subsets)")


PHP Formatted Code
class fits_operation():

    def __init__(self, verb=True):
        self.verb = verb
        self.meetc = myEnv.etc(verb=self.verb)
        self.mefo = myEnv.file_operation(verb=self.verb)
        self.ho = header_operation(verb=self.verb)

    def darkcombine(self, file_list, out_file, combine="median",
        reject="minmax", scale="exposure", ccdtype=""):
        ret = False
        files = self.meetc.join_list_items_to_string(file_list)
        if files[0]:
            dc.input = files[1]
            dc.output = out_file
            dc.combine = combine
            dc.reject = reject
            dc.ccdtype = ccdtype
            dc.scale = scale
            dc.process = "no"
            try:
                dc._runCode()
                ret = True
            except Exception as e:
                self.meetc.print_if(e)
 


Here my inputs:
files[1]: "/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-001V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-002V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-003V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-004V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-005V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-006V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-007V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-008V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-009V.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010B.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010U.fit,/home/msh/Desktop/2013-09-13/V523_Cas/Dark/Dark-010V.fit"
out_file: "/home/msh/Desktop/dark.fit"
combine: "average"
reject: "minmax"
ccdtype: ""
scale: "exposure"


I tried to use iraf itself. I was able to create master dark.
Same, I was able to create the master dark using directly pyraf.

Why I get such en error. There is no parameter as subsets in darkcombine. What's wrong?



After a long Trial and error, I think I solve the problem.
As I understood combine task can not get value longer that 1024 Chars as input. As you see my input up there is 1710 chars.
So the best solution might be adding file names to a text file and use @[listOfFiles] method.

 
Profile Email
 Quote
   
Content generated in: 0.09 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login