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

Computation of the alpha and beta diversity still uses the raw image file #24

Closed
IAGO1215 opened this issue Oct 4, 2023 · 2 comments
Closed

Comments

@IAGO1215
Copy link

IAGO1215 commented Oct 4, 2023

  1. According to the tutorial website, in order to compute the alpha and beta diversity, the raster image file generated in the step of Spectral Species Mapping should be used as input image file for the functions "map_alpha_div" and "map_beta_div". But in the tutorial example code, all these functions use the raw Sentinal-2 raster file as image input.

  2. The Spectral Species Mapping step directly uses the result of PCA, instead of using the result of both PCA and component selection (some bands being discarded). However Functional Diversity this step takes into consideration of both PCA and component.

I apologize if the answers to these questions are already explicit.

Edit: grammar correction

@jbferet
Copy link
Owner

jbferet commented Oct 4, 2023

yes indeed,

  1. the spectral species files are used to compute alpha and beta diversity metrics. However, the arborescence of the results directory produced with biodivMapR can be deduced directly from the name of the input image file and the type of dimensionality reduction applied.
    This is why the functions do not require explicit definition of the path for the spectral species map.

  2. The file 'Selected_Components.txt' is assumed to be produced after PCA file is produced. Then as for previous answer, biodivMapR deduces the path for 'Selected_Components.txt' and directly reads it when performing next steps. It is possible to bypass the use of the 'Selected_Components.txt' file when computing spectral species, if user provides a vector containing selected features from raste to be used as 'SelectedPCs' input variable. This functionality allows user to perform spectral species mapping from any stacked raster file they decide (as long as provided in ENVI BIL format), for example a selection of spectral indices or other variables derived from one or multiple sensors (assuming the data coresponding to the selected bands of a user defined set of variables does not require additional transformation).

input variables management may be updated in a next version, as the different functions require quite a lot of (too many) input variables, and I understand that this may be confusing and unpractical for users.

@IAGO1215
Copy link
Author

IAGO1215 commented Oct 4, 2023

Thank you for your quick response, which has resolved my confusion.

For now, I will try to make sure that all the inputs on my end are as clear as possible, since I haven't got myself familiar with how the deduction works especially when dealing with different directory structure.

Regarding the specific input variables, I will consult the "Reference" section on your website.

The issue is currently fixed on my side.

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

2 participants