Skip to content

Commit

Permalink
Rearrange imports in gwpy.table.gravityspy
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Urban committed Mar 19, 2020
1 parent b68ef62 commit ecdf53f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions gwpy/table/gravityspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
"""Extend :mod:`astropy.table` with the `GravitySpyTable`
"""

import os.path
import json
import os
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen

import numpy as np

from astropy.utils.data import get_readable_fileobj

from ..utils import mp as mp_utils
from .table import EventTable
import numpy as np

__author__ = 'Scott Coughlin <scott.coughlin@ligo.org>'
__all__ = ['GravitySpyTable']
Expand Down Expand Up @@ -71,7 +77,6 @@ def download(self, **kwargs):
-------
Folder containing omega scans sorted by label
"""
import os
# back to pandas
try:
images_db = self.to_pandas()
Expand Down Expand Up @@ -191,11 +196,6 @@ def search(cls, gravityspy_id, howmany=10,
an evaluation of the Euclidean distance of the input image
to all other images in some Feature Space
"""
from astropy.utils.data import get_readable_fileobj
import json
import urllib
from urllib.error import HTTPError

# Need to build the url call for the restful API
base = 'https://gravityspytools.ciera.northwestern.edu' + \
'/search/similarity_search_restful_API'
Expand All @@ -218,7 +218,7 @@ def search(cls, gravityspy_id, howmany=10,
'database': 'similarity_index_o3',
}

search = urllib.parse.urlencode(parts)
search = urlencode(parts)

url = '{}/?{}'.format(base, search)

Expand Down

0 comments on commit ecdf53f

Please sign in to comment.