In [7]:
from IPython.display import IFrame, Image, display, HTML
def myiframe(url):
return IFrame(url, width=700, height=350)
def myiframe2(url):
return HTML('<iframe src={} width=700 height=350></iframe>'.format(url))
def myimgdisplay(url):
i = Image(filename=url)
return display(i)
In [26]:
myimgdisplay('./imrs.php.jpeg')
In [4]:
myiframe('http://tools.pds-rings.seti.org/opus')
Out[4]:
In [5]:
from pyciss import opusapi
opus = opusapi.OPUS()
In [19]:
opus.get_filename('N1695760475_1')
Out[19]:
In [20]:
opus.r.url
Out[20]:
In [21]:
[i for i in dir(opus) if not i.startswith('_')]
Out[21]:
In [12]:
opus.show_images(size='med')
Out[12]:
In [24]:
opus.download_results()
In [25]:
# Projected ring resolution
opus.get_between_resolutions(0.5, 0.7)
In [8]:
# %load ~/Dropbox/src/pyciss/pyciss/pipeline.py
from __future__ import division, print_function
from pysis.isis import ciss2isis, cisscal, spiceinit, ringscam2map, getkey,\
editlab, dstripe, isis2std
from pysis.util import file_variations
from pysis import IsisPool
import gdal
import numpy as np
from os.path import join as pjoin
import os
from pyciss import plotting
from pyciss.io import dataroot
from . import io
ISISDATA = os.environ['ISIS3DATA']
def calibrate_ciss(img_name, name_only=False):
(cub_name,
cal_name,
dst_name,
map_name) = file_variations(img_name,
['.cub',
'.cal.cub',
'.dst.cal.cub',
'.map.dst.cal.cub'])
if name_only:
return map_name
ciss2isis(from_=img_name, to=cub_name)
targetname = getkey(from_=cub_name,
grp='instrument',
keyword='targetname')
# forcing the target name to Saturn here, because some observations of
# the rings have moons as a target, but then the standard map projection
# onto the Saturn ring plane fails.
# see also
# https://isis.astrogeology.usgs.gov/IsisSupport/index.php/topic,3922.0.html
if targetname.lower() != 'saturn':
editlab(from_=cub_name, options='modkey',
keyword='TargetName', value='Saturn',
grpname='Instrument')
spi ceinit(from_=cub_name, cksmithed='yes', spksmithed='yes',
shape='ringplane')
cisscal(from_=cub_name, to=cal_name)
dstripe(from_=cal_name, to=dst_name, mode='horizontal')
ringscam2map(from_=dst_name, to=map_name,
map=pjoin(ISISDATA,
'base/templates/maps/ringcylindrical.map'))
isis2std(from_=map_name, to=map_name[:-3]+'tif', format='tiff')
return map_name
In [6]:
myimgdisplay('./N1467345680_2_Filtered.png')