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

Handling "curved" growth trajectories #32

Closed
droglenc opened this issue Dec 5, 2018 · 3 comments
Closed

Handling "curved" growth trajectories #32

droglenc opened this issue Dec 5, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@droglenc
Copy link
Contributor

droglenc commented Dec 5, 2018

Thanks for developing the RFishBC package. I was hoping to use it to back-calculate length at age for my annotated library of Bluefin tuna otoliths. One complication with these otoliths is that the transect does not follow the arm of the otolith. I thought that if the snap2transect argument was false I would have access to the x and y coordinates of the selected annuli and that I could sum the inter annular distances from origin to margin instead of using the transect distance for back calculating length at age.

@droglenc droglenc added enhancement New feature or request help wanted Extra attention is needed labels Dec 5, 2018
@droglenc droglenc self-assigned this Dec 5, 2018
@droglenc
Copy link
Contributor Author

droglenc commented Dec 5, 2018

Thanks for the question. I think that I understand your problem, but let me “talk out loud” below to see if do. Please correct me if I am wrong.

I don’t think that there is an immediate answer to your problem with the way that I have coded RFishBC thusfar. So, currently RFishBC calculates “radii” as distances from the focus to an annulus. So the “radius” for the third annulus would be computed by calculating the distance from the third annular mark back to the focus. I think what you are asking me is that you need the third “radius” to be calculated as the sum of the distance from the focus to the first annular mark, the distance from the second annular mark to the first, and the distance from the third annular mark to the second. In this way, your “radius” would visually look like a possibly curved segmented line rather than a straight line. Does that seem about right?

If so, there are two options. First, I need to modify RFishBC. If what I said above is correct then I think that this is not a huge modification. However, I would probably take my time making the change to make sure that I don’t screw something else in the package up. Also, we are approaching finals week where I teach, so it may take a bit to get to this.

Second, if time is of the essence for you, then the X-Y coordinates for the selected points are in the “pts” data.frame stored inside the RDS file. You could compute the lengths of the segments from that.

If you can, let me know if I have the “problem” articulated correctly above. If so, I will try to think about how to do this and make the necessary changes to the package.

Thanks for bringing this up.

@droglenc
Copy link
Contributor Author

droglenc commented Dec 5, 2018

Yes, my radius would look like a curved segmented line. The challenge for me will be to digitize the annuli so that they produce a fairly smooth curve.
I am content to wait for the modification to your code. I was not sure what the trick was to access the rds file contents but now realize that there is a readRDS function.

@droglenc
Copy link
Contributor Author

droglenc commented Dec 9, 2018

Will be addressed in v0.2.0

@droglenc droglenc closed this as completed Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant