Giter VIP home page Giter VIP logo

Comments (5)

pbrotoisworo avatar pbrotoisworo commented on July 17, 2024 1

Hmm, I found the relevant XML file in the .pyrosar folder. But I'm not sure where is the code that creates the data in .pyrosar\snap\nodes. Can you point me to where it is @johntruckenbrodt ? I think I can try and sort this out.

from pyrosar.

johntruckenbrodt avatar johntruckenbrodt commented on July 17, 2024 1

This is all done in function pyroSAR.snap.auxil.parse_node. It executes gpt Collocate -h, reads the XML representation, and stores it in the .pyrosar/snap/nodes folder.

Setting the node's source(s) is done here. Node.source has a get method (property) and a set method (@source.setter).

So the first question is whether parse_node has to be modified so that the XML representation is better or whether this looks alright and just the source.setter has to be adjusted to properly fill in the values of the list of node IDs you want to set as source.

from pyrosar.

johntruckenbrodt avatar johntruckenbrodt commented on July 17, 2024

Hi @pbrotoisworo I have never used the Collocate node and apparently pyroSAR is not treating it correctly.
The XMl template looks like this:

<?xml version="1.0" ?><node id="Collocate">	
      	<operator>Collocate</operator>	
      	<sources>		
        		<sourceProduct refid="Read"/>		
        		<slave/>		
        		<sourceProducts/>		
      	</sources>	
      	<parameters class="com.bc.ceres.binding.dom.XppDomElement">		
        		<sourceProductPaths/>		
        		<masterProductName/>		
        		<targetProductType>COLLOCATED</targetProductType>		
        		<renameMasterComponents>true</renameMasterComponents>		
        		<renameSlaveComponents>true</renameSlaveComponents>		
        		<masterComponentPattern/>		
        		<slaveComponentPattern/>		
        		<resamplingType>NEAREST_NEIGHBOUR</resamplingType>		
      	</parameters>	
    </node>

passing multiple IDs as source to a node was developed for SliceAssembly, whose template looks like this:

<?xml version="1.0" ?><node id="SliceAssembly">	
      	<operator>SliceAssembly</operator>	
      	<sources>		
        		<sourceProduct refid="Read"/>		
      		        <sourceProduct.1 refid="Read (2)"/>	
        </sources>	
      	<parameters>		
        		<selectedPolarisations/>		
      	</parameters>	
    </node>

I am sure it is not so hard to adjust, but it will take me some days to find the time for it. If you are faster then a PR is of course always appreciated 😉.

from pyrosar.

pbrotoisworo avatar pbrotoisworo commented on July 17, 2024

Ah I see. Thanks for the pointers I'll take a look at it.

from pyrosar.

johntruckenbrodt avatar johntruckenbrodt commented on July 17, 2024

Awesome! Thanks @pbrotoisworo

from pyrosar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.