capturing standard output from a python script that calls lonlat2pixline
capturing standard output from a python script that calls lonlat2pixline
Hi -- Did you folks change something with lonlat2pixline in seadas 7.5? With seadas 7.4, I used subprocess.Popen and subprocess.communicate() commands to obtain the standard output from the call to lonlat2pixline in my python (2.7) program and now it does not seem to work.
p= subprocess.Popen('lonlat2pixline -v ' + fname_l1a + ' ' + fname_geo + ' ' + west + ' ' + south + ' ' + east + ' ' + north, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout,stderr = p.communicate()
It captures some of the output, but not the last important bit of lines and pixls before preceding to the rest of the program with this missing [important] information.
I realize this is more of a python question than a seadas question, but I've been banging my head long enough-- and figured you might have a 2 second answer for me.
Regards
Bruce
Hi--- As follow-up... I figured out "my" problem. I re-downloaded a new viirs L1A file and things worked just fine with capturing the output of lonlat2pixline. Sorry if my questions sent you off spending time checking on lonlat2pixline. --Bruce
p= subprocess.Popen('lonlat2pixline -v ' + fname_l1a + ' ' + fname_geo + ' ' + west + ' ' + south + ' ' + east + ' ' + north, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout,stderr = p.communicate()
It captures some of the output, but not the last important bit of lines and pixls before preceding to the rest of the program with this missing [important] information.
I realize this is more of a python question than a seadas question, but I've been banging my head long enough-- and figured you might have a 2 second answer for me.
Regards
Bruce
Hi--- As follow-up... I figured out "my" problem. I re-downloaded a new viirs L1A file and things worked just fine with capturing the output of lonlat2pixline. Sorry if my questions sent you off spending time checking on lonlat2pixline. --Bruce
Filters:
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
capturing standard output from a python script that calls lonlat2pixline
> Hi--- As follow-up... I figured out "my" problem. I re-downloaded a new viirs L1A file and things worked just fine with capturing the output of lonlat2pixline. Sorry if my questions sent you off spending time checking on lonlat2pixline.
No worries :grin:
BTW, lonlat2pixline can read a MODIS GEO file directly (and it's faster than if you give it the L1A/GEO combo since it can skip the L1A load)....and you probably don't need the -v option either.
Regards,
Sean