Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updates Bundle Observation Vector to support Csm observations. #4457

Merged
merged 27 commits into from
May 13, 2021

Conversation

krlberry
Copy link
Contributor

@krlberry krlberry commented May 12, 2021

Description

  • Updates Bundle Observation Vector to support Csm observations.

This is ready for review / eventual merge.

Related Issue

#4410

Motivation and Context

See #4410

How Has This Been Tested?

ctest -R Jigsaw && ctest -R jigsaw && ctest -R Bundle

Tests pass!

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation change (update to the documentation; no code change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read and agree to abide by the Code of Conduct
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have added myself to the .zenodo.json document.
  • I have added any user impacting changes to the CHANGELOG.md document.

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

Kristin Berry added 21 commits April 28, 2021 09:10
…bservation and add Csm camera type to Camera enum
… class and added ImageCoeffs population to Csm Observation class
…ighting that it is possible to to the observation classes
…w jigsaw to proceed past the setup stage for csm networks
}

BundleObservation *isisObservation = NULL;
CsmBundleObservation *csmObservation = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to do this. You can just use an Abstract observation.

bundleObservation.reset(isisObservation);
}
else {
// csmObservation->setSolveSettings(solveSettings); doesn't exist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does exist, see CsmBundleObservation::setSolveSettings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jessemapel forgot to update that. It didn't exist, I think, before the merge.

Copy link
Contributor

@jessemapel jessemapel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the ISIS and CSM observation API are so much closer together now, I am not a big fan of the two vectors solution. Can we instead initialize the exterior orientation and body rotation in the addNew function? They get called immediately after it anyway.

There's even a TODO in the current code for this:

https://github.com/USGS-Astrogeology/ISIS3/blob/dev/isis/src/control/objs/BundleAdjust/BundleAdjust.cpp#L438

@krlberry krlberry requested a review from jessemapel May 12, 2021 23:17

bool isIsisObservation = true;

// This NULL check is needed solely for the unit test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much work would it be to update the unit test and remove these if camera!=NULL checks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure. I can give it a try and timebox it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's working so how about we merge this and you can put up a separate PR that tries to remove these?

@jessemapel jessemapel merged commit 42054c0 into DOI-USGS:csmbundle May 13, 2021
tgiroux pushed a commit to tgiroux/ISIS3 that referenced this pull request Jun 8, 2021
…SGS#4457)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
tgiroux pushed a commit to tgiroux/ISIS3 that referenced this pull request Jun 8, 2021
…SGS#4457)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
tgiroux pushed a commit to tgiroux/ISIS3 that referenced this pull request Jun 8, 2021
…SGS#4457)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
tgiroux pushed a commit to tgiroux/ISIS3 that referenced this pull request Jun 9, 2021
…SGS#4457)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
jessemapel pushed a commit that referenced this pull request Jun 17, 2021
* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
jessemapel added a commit that referenced this pull request Jun 29, 2021
* copylab

* Initial work toward a working AbstractBundleObservation class

* Fix accidentl add of temporary changes from another project

* Trial 2 on fixing my accidental changes

* csm bundle building properly (#4409)

* Updates for linking and compiling

* Starting virtual functions

* Add virtuals to AbstractBundleObservation and get compiling again

* Remove function from parent

* Get jigsaw tests passing on csmbundle branch (#4413)

* Add virtuals to AbstractBundleObservation and get compiling again

* Remove function from parent

* Get existing jigsaw tests passing

* Remove unneeded functions from BundleObservation

* Clean up a bit more

* Clean up BundleObservation and AbstractBundleObservation more

* Remove unneeded BodyRotation

* Add target body solve back into bundle adjusment calc

* Remove debug output

* Removed unneeded memeber variables BundleObservation

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>

* Move some functions to pure virtual

* Csmobservation (#4419)

* Now compiling

* Updated CSMCamera tests and docs

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Added required headers from removed ground map header (#4427)

* last missing header (#4428)

* Moved CSM settings into BOSS

* Generates Serial Numbers using CSM label information (#4437)

* Creates Serial Numbers using CSM label information

* Updated second SerialNumberList:add function to accommodate CSM label

* Add hooks for csm bundle settings to jigsaw (#4438)

* In progress

* Added tests and Pvl support

* Add missing 'y' to docs

Co-authored-by: Kristin Berry <kberry@usgs.gov>

* Moves partial calculation into CSM and ISIS observation classes. (#4436)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>

* Implemented bundleOutputString for CSM (#4444)

* Added test for CSM bundleOutputString

* Passing unit test and updates to bundleOutputString

* Addressed PR feedback

* Csmcsv (#4446)

* CSM CSV output

* Small test clean-up

* typo fix

* obs header fix

* Remove param list from bo

* Added debug output

* Now reurning

* Fixed unit test

* xml save test update

* Clean up bundleresults unit test output

* Fixed qfile member

* Fixed old path

* Changed header to use param names

* Making separate csvs

* Added reverse on obs by instId

* Trying to fix multiple sensors

* Fixed images header

* More debug

* removed debug outs

* Added terrible imageindex search

* Added held config fix

* Updated for observation test

* Updated jigsaw test makefiles

* Updated with new tests

* Updates Bundle Observation Vector to support Csm observations. (#4457)

* Remove duplicated member variables and accesor functions from BundleObservation and add Csm camera type to Camera enum

* Remove commented-out code

* Imagecoeff migrated into BundleObservation class working

* Get base level working for all coeffs in ISIS

* Fix accidental move into if statement to get tests passing again

* Updated RHS for CsmBundleObservation to work

* Adds point3D support to CSM Camera observations and also adds ground Partials member function to CSMCamera

* Draft of sensor partials code

* Add docs, some fixes based on review requests

* move computation of weights and observation values to bundle observations

* Add observationvalue function to CsmBundleObservation and move the weighting that it is possible to to the observation classes

* Make CSMSolveSet an optional parameter to get jigsaw tests passing again

* cleanup

* Move observation weights into MLE if block

* Added isis vs. csm support to Bundle Observation Vector class to allow jigsaw to proceed past the setup stage for csm networks

* Comment cleanup

* Fix failing unit tests

* Add docs

* Updated based on feedback with potentially temporary fix to get unit tests passing

* Update tests a bit

* Aligned signature definitions and cleaned up

* remove unneeded functions

* More comment cleanup

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>

* Jigsaw Test Conversions (sccconfig, scconfigHeld, radar) (#4463)

* Converted jigsaw scconfig tests.

* Added jigsaw radar test

* Updated tests to reflect PR #4446 changes & removed makefile tests

* Updates to scconfig tests

* Gets csm bundle converging (#4464)

* Added cam type checks

* checking csm partials

* Debug partials

* debug corrections

* Fixed index

* Scaled ground partials

* Updated param comparison

* Removed debug out

* Fixes spacing issue in CSM bundleout.txt (#4465)

* Update csm bundlout to have correct spacing for paramter names

* Reverted unintential change

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>

* Removed unit-test specific changes I made to the code instead of the unit test

* Add latitudinal partials for CSM (#4468)

* Add latitudinal partials for CSM

* Added test

Co-authored-by: Jesse Mapel <jmapel@usgs.gov>

* Csm clean up (#4483)

* Added cms index list error

* Added CSMCameraTests for partials

* Observation clean-up

* Cleaned up vector

* Rename BundleObservation classes (#4518)

* rename BundleObservation classes

* omit changes to sip wrappers

* Adds more capabilities to TestCsmModel (#4527)

* Updated to get new isd/state form to test jigsaw parsing

* Add functional image-to-ground, ground-to-image, and isd-parsing to TestCsmModel

* Remove temporary csminit test changes

* Updated variable name for clarity

* add csm info to app docs for csminit and jigsaw

* Csmbundle - remove SIP wrappers and deprecated formatBundleOutputString (#4526)

* remove sip wrappers

* remove deprecated formatBundleOutputString

* remove more sip code and formatBundleOutputString

* Fix functional tests to work with updated TestCsmModel (#4534)

* Tests + test data for CSM jigsaw (#4530)

* Removed debug couts

* Added csmnetwork test fixture

* Added a test for CSM test network

* Adjusted trig functions + added deg/rad conversions

* Initial CSMNetwork data

* Uncommented code

* Removed network path and control network from CSMNetwork fixture

* Removed temporary path from csv comparison

* Adjusted spacing + responded to PR feedback

Co-authored-by: Austin Sanders <arsanders@ugs.gov>

* Added the ability to update CSM model state in jigsaw (#4529)

* Added the ability to update CSM model state in jigsaw

* Added missing function docs

* Updated CSM jigsaw test to check apply

* Wrangled up an F

* Added changelog entry

* General clean-up

* Changed Camera local photometric calculations to not use bodyrotation

* Changed csm camera to save look on non-intersection

* Fixed docs typos

Co-authored-by: Kristin Berry <kberry@gyro.wr.usgs.gov>
Co-authored-by: Kristin Berry <kberry@usgs.gov>
Co-authored-by: Amy Stamile <74275278+amystamile-usgs@users.noreply.github.com>
Co-authored-by: Tim Giroux <62255438+tgiroux@users.noreply.github.com>
Co-authored-by: Tim Giroux <tgiroux@contractor.usgs.gov>
Co-authored-by: AustinSanders <arsanders@usgs.gov>
Co-authored-by: Austin Sanders <arsanders@ugs.gov>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants