Unverified Commit af3a6837 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Updates to get kalisiris working and improved subpix (#578)



* Updates to get kalisiris working and improved subpix

* Updates ground for kali changes

* Moves DEM into an interface and adds the ability to use an ellipsoid (#576)

* Moved DEM to an interface

* Actually added surface

* Added new options to demo config

* Updated Surface doc strings

Co-authored-by: default avatarjlaura <jlaura@usgs.gov>

* image_to_ground fix (#580)

* test(test_isis.py): image_to_ground() failure with map-projected image and single lon and lat.

* test(test_isis.py): image_to_ground() failure with non-map-projected image and arrays of lon and lat.

* fix(spatial/isis.py): image_to_ground() now properly returns correct values or numpy arrays, tests improved.

* working ground control

* Collection of minor changes for the 0.6.0 release to ensure functioning code. Tested in quad generation.

* Updates for PR comments; removed duplicitive bytescale call

Co-authored-by: default avatarJesse Mapel <jmapel@usgs.gov>
Co-authored-by: default avatarRoss Beyer <rbeyer@rossbeyer.net>
parent 2dc2ca8d
Loading
Loading
Loading
Loading

CHANGELOG.md

0 → 100644
+51 −0
Original line number Diff line number Diff line
# Changelog

All changes that impact users of this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!---
This document is intended for users of the applications and API. Changes to things
like tests should not be noted in this document.

When updating this file for a PR, add an entry for your change under Unreleased
and one of the following headings:
 - Added - for new features.
 - Changed - for changes in existing functionality.
 - Deprecated - for soon-to-be removed features.
 - Removed - for now removed features.
 - Fixed - for any bug fixes.
 - Security - in case of vulnerabilities.

If the heading does not yet exist under Unreleased, then add it as a 3rd heading,
with three #.


When preparing for a public release candidate add a new 2nd heading, with two #, under
Unreleased with the version number and the release date, in year-month-day
format. Then, add a link for the new version at the bottom of this document and
update the Unreleased link so that it compares against the latest release tag.


When preparing for a bug fix release create a new 2nd heading above the Fixed
heading to indicate that only the bug fixes and security fixes are in the bug fix
release.
-->

## [0.6.0]

### Added
- Abstract DEM interface that supports ellipsoids #576
- Fourier-Mellon subpixel registration #558

### Changed
- Updates center of gravity style subpixel matcher to use scipy.ndimage.center_of_mass of determining subpixel shifts
- Use `kalisiris` instead of `pysis` #573
- Moved `acn_submit` cluster submission script into the library and added tests for cluster submission #567
- Point identifier no longer needs to be a unique string

### Fixed
- Image to ground to support multiple input types with proper output type handling #580
- Support for ISIS special pixels in image data #577
- Fix for no correlation map returned from `geom_match_simple` #556
+4 −4
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ from sqlalchemy.sql.expression import bindparam
from autocnet.io.db.model import Points, Measures
from autocnet.utils.serializers import object_hook

def watch_insert_queue(queue, queue_name, counter_name, engine, stop_event):
def watch_insert_queue(queue, queue_name, counter_name, engine, stop_event, sleep_time=5):
    """
    A worker process to be launched in a thread that will asynchronously insert or update 
    objects in the Session using dicts pulled from a redis queue. Using this queuing approach
@@ -98,9 +98,9 @@ def watch_insert_queue(queue, queue_name, counter_name, engine, stop_event):
                measures = [measure for sublist in measures for measure in sublist]
                conn.execute(
                    insert(Measures.__table__), measures)
        time.sleep(5)
        time.sleep(sleep_time)

def watch_update_queue(queue, queue_name, counter_name, engine, stop_event):
def watch_update_queue(queue, queue_name, counter_name, engine, stop_event, sleep_time=5):
    """
    A worker process to be launched in a thread that will asynchronously insert or update 
    objects in the Session using dicts pulled from a redis queue. Using this queuing approach
@@ -173,4 +173,4 @@ def watch_update_queue(queue, queue_name, counter_name, engine, stop_event):
                    stmt, measures
                )

    time.sleep(5)
    time.sleep(sleep_time)
+5 −3
Original line number Diff line number Diff line
@@ -2064,7 +2064,7 @@ class NetworkCandidateGraph(CandidateGraph):
                else:
                    continue

    def add_from_remote_database(self, source_db_config, path,  query_string='SELECT * FROM public.images LIMIT 10'):
    def add_from_remote_database(self, source_db_config, path=None,  query_string='SELECT * FROM public.images LIMIT 10'):
        """
        This is a constructor that takes an existing database containing images and sensors,
        copies the selected rows into the project specified in the autocnet_config variable,
@@ -2089,7 +2089,8 @@ class NetworkCandidateGraph(CandidateGraph):
               The PATH to which images in the database specified in the config
               will be copied to. This method duplicates the data and copies it
               to a user defined PATH to avoid issues with updating image ephemeris
               across projects.
               across projects. The default PATH is (None), meaning the data will
               not be copied.

        query_string : str
                       An optional string to select a subset of the images in the
@@ -2130,6 +2131,7 @@ class NetworkCandidateGraph(CandidateGraph):
        sourcesession.close()

        # Create the graph, copy the images, and compute the overlaps
        if path:
            self.copy_images(path)
        self.from_database()
        self._execute_sql(compute_overlaps_sql)
+0 −5
Original line number Diff line number Diff line
import json
from unittest.mock import patch

import fakeredis
import numpy as np
import pytest

@@ -18,10 +17,6 @@ def args():
                'processing_queue':'processing'}
    return arg_dict

@pytest.fixture
def queue():
    return fakeredis.FakeStrictRedis()

@pytest.fixture
def simple_message():
    return json.dumps({"job":"do some work",
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ class Points(Base, BaseMixin):

    id = Column(Integer, primary_key=True, autoincrement=True)
    _pointtype = Column("pointType", IntEnum(PointType), nullable=False)  # 2, 3, 4 - Could be an enum in the future, map str to int in a decorator
    identifier = Column(String, unique=True)
    identifier = Column(String)
    overlapid = Column(Integer, ForeignKey('overlay.id'))
    _geom = Column("geom", Geometry('POINT', srid=latitudinal_srid, dimension=2, spatial_index=True))
    cam_type = Column(String)
Loading