NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
478 stars 168 forks source link

Integration with spiceinit web service #389

Closed Hyradus closed 1 year ago

Hyradus commented 1 year ago

Is your feature request related to a problem? Please describe. Due to recent changes in ISISDATA structure, I cannot process anymore hiedr2mosaic.py since it crash at spice function due to missing kernels. My ISISDATA is updated to the recent version. Running the hiedr2mosaic.py commands one by one, highlight exactly the probelm with spiceinit since if I use spiceinit WEB=True, it works flawlessly.

Describe the solution you'd like A clear and concise description of what you want to happen. Add a new argument to hiedr2mosaic.py to enable spiceinit web

I have already edited hiedr2mosaic.py with the new argument and tested with success.

def spice( cub_files, threads, web):
    for cub in cub_files:
        cmd = f'spiceinit WEB={web} from={cub}'
        add_job(cmd, threads)
    wait_on_all_jobs()
    for cub in cub_files:
        cmd = 'spicefit from= '+ cub
        add_job(cmd, threads)
    wait_on_all_jobs()
    return

and in the main function

[...]
parser.set_defaults(web=False)
[...]
parser.add_option("-w", "--web", dest="web",
                              help="Uses spiceinit web (default False).")
[...]

I'll create a PR if this is ok.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context This may be implemented also to other scripts such as lronac2mosaic.py

oleg-alexandrov commented 1 year ago

A pull request will be very welcome.

Hyradus commented 1 year ago

@oleg-alexandrov PR already under review :)

oleg-alexandrov commented 1 year ago

Would be so nice if every day code would just write itself. :)