Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

#2 after Points basic functionality, connect to Outputs #5

Open
2 tasks
HaleySchuhl opened this issue Mar 4, 2024 · 0 comments
Open
2 tasks

#2 after Points basic functionality, connect to Outputs #5

HaleySchuhl opened this issue Mar 4, 2024 · 0 comments

Comments

@HaleySchuhl
Copy link
Contributor

HaleySchuhl commented Mar 4, 2024

  • SAVE coords to Outputs class
  • SAVE counts per group label to Outputs

Not yet sure how to handle communication between Outputs :

from plantcv.plantcv import warn, params, outputs


def save_counts(self, label=None):
        """Save collected coordinates to Outputs.observations""" 
        if label is None:
            label = params.sample_label
        for i, x in enumerate(self.count.keys()):
            variable = x
            value = self.count[x]
            outputs.add_observation(sample=label, variable=str(variable) + "_count",
                                    trait='count of category',
                                    method='count', scale='count', datatype=int,
                                    value=value, label='none')

def save_coords(self, label=None):
        """Save collected coordinates to Outputs.observations""" 
        if label is None:
            label = params.sample_label
        for i, x in enumerate(self.count.keys()):
            variable = x
            value = self.points[x]
            outputs.add_observation(sample=label, variable=str(variable) + "_coords",
                                    trait='collected coordinates',
                                    method='annotation', scale='count', datatype=list,
                                    value=value, label='none')

@HaleySchuhl HaleySchuhl changed the title after Points basic functionality, connect to Outputs #2 after Points basic functionality, connect to Outputs Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant