-
Notifications
You must be signed in to change notification settings - Fork 7
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
Acoustics module update #34
base: main
Are you sure you want to change the base?
Acoustics module update #34
Conversation
Just starting this. Still have work to do on updating the calculations, but this will be the next large update. |
@tnelson-integral I fixed the installation issues in IntegralEnvision#17 But I am having trouble with the tutorials. Did the cases change/ is there a new shared Drive? |
@ssolson There is a new set of files for the tutorial. I just sent you the invite to the files. Probably an enhancement for a future time is to allow .ini files with missing fields. |
initGui, Signal-Slot Connections
All the default files in the Tanana river folder have been deleted and replace with aelleson .ini file paths. |
@ssolson Should be updated now |
Same problem with the style files. Could you just confirm that you can get the tutorials to work and update the files as needed? |
@ssolson Everything should be updated and working with the recent changes. |
Tim I don't know how this is working for you.
Again, could you just confirm that you can get the tutorials to work and update the files as needed? |
I can get everything to run with the last change and a small updated to the .default files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tim apologies for my delayed review on this from the Hurricane/ Conference. I am finally catching up on everything. I am having a couple of issues/ questions with this module:
I think most importantly we need to address the crashing of QGIS/ SEAT and make sure the example results are up to date in the documentation. I am not going to address all the coding issues due to budget constraints.
SEAT causes QGIS to crash if:
- If I click "weighting" or "Acoustic Metric" before anything else
- If I type a non numeric value into "Acoustic Threshold Value"
- If I run the acoustics module via a Load GUI then click the SEAT plugin again to run a different simulation
SEAT will crash:
- If I click Save GUI Inputs then cancel
Tanana River Issues
- After running the Tanana river example I cannot see the QuickMapService
a. QuickMap will work before running the Tanana River example
b. QuickMap works on the Pacwave Example
c. Can you see QuickMap after running the example?
Pacwave Issues
- The Acoustics Results in PacWave example
a. The Results are unruly due to the results being shown for 14 Sea-states. Anyway you can think of to simplify?
b. Most of the results are a single solid color. Is this the correct output?
c. It looks like you guys updated the acoustics documentation inputs but not the outputs. Can you update the outputs you expect so I can be sure I am matching. Currently mine are very different from the previous results.
d. This example is really slow now on the order of 5 minutes to run. Is this expected?
@@ -386,15 +385,25 @@ def select_and_load_in(self) -> None: | |||
self.test_exists(self.dlg.paracousti_device_not_present, fin, "Directory") | |||
fin = config.get("Input", "paracousti probabilities file") | |||
self.test_exists(self.dlg.paracousti_probabilities_file, fin, "File") | |||
fin = config.get("Input", "paracousti threshold file") | |||
self.test_exists(self.dlg.paracousti_threshold_file, fin, "File") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the tests is failing because you paracousti_threshold_value no longer comes from a file so we do not check for file existence any longer
.. _01_paracousti_preprocessing: | ||
Paracousti Pre-Processing | ||
------------------------- | ||
Several metrics can be calculated from ParAcousti output that are useful in determining impacts to marine species. These include the weighted and unweighted sound pressure level (SPL) and sound exposure level (SEL). Due to the resource and time-intensive calculations, a stand-alone python routine is included within the SEAT package. This routine calculates the user selected metrics and weights form the existing Paracousti metrics. The calculated metrics are saved to a netcdf variable with the same dimensions as the original Paracousti netcdf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form => from
To run the Paracousti pre-processing routine, | ||
|
||
.. code-block:: python | ||
|
||
from utils import paracousti_fxns | ||
paracousti_path = r'./Path/to/Paracousti/netCDF' | ||
save_path = r'./Path/to/save/updated/netCDF' | ||
calc_paracousti_metrics(paracousti_path, save_path, weights="All") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really unclear on top of being a disjointed user experience. These functions should be accessible from the normal Paracousti or SEAT workflow, not some in between random function.
There is no budget to fix this at this point so going with this version:
For this to work the user will need to activate their qgis python environment. That has to be mentioned.
Is the paracousti_path and save_path above a file or a folder?
It is unclear to me if this is required to use the SEAT acoustics modules or not. Do I always need to run this pre-processing routine?
- **Geotiff Details**: | ||
- Must have the same projection and datum as the model files. | ||
- Will be nearest-neighbor interpolated to align with the model files' grid points (structured/unstructured). | ||
- Must be integer classified, e.g., (0 = 'Kelp', 1 = 'Rock') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the "Depth Averaging" input?
Depth Averaging | ||
^^^^^^^^^^^^^^^^ | ||
|
||
The Depth Averaging drop down box serves as an option to determine the depth sampling of the model results. | ||
|
||
.. figure:: ../../media/depth_avg.webp | ||
:scale: 100 % | ||
:alt: Temporal Averaging | ||
|
||
The depth selection options for acoustics are: | ||
|
||
1. **Depth Maximum**: Maximum value over depth. | ||
2. **Depth Average**: Mean value over depth. | ||
3. **Bottom Bin**: Value from bottom bin. | ||
4. **Top Bin**: Value from top bin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the GUI Depth Averaging is currently in inputs not the Species Properties sub Tab. Lets fix either the location in the GUI or location in the docs.
To run this demonstration, use the **Load GUI Inputs** button located at the bottom left of the SEAT GUI, navigate to :file:`DEMO_acoustics/pacwave/`, and there will be three files available to choose from: | ||
|
||
- `acoustics_module_SEL_199db_threshold.ini`: Sound exposure level with a 199db threshold | ||
- `acoustics_module_SEL_HFC_173db_threshold.ini`: Sound exposure level for high frequency creteceans with a 173db threshold | ||
- `acoustics_module_SEL_LFC_199db_threshold.ini`: Sound exposure level for low frequency creteceans with a 199db threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the definition of what each demo is. We need to say which demo we are going to run for the outputs below and update the outputs to match.
|
||
.. Note:: | ||
Your paths will differ than the ones shown in the example below. If you get an error double check the paths making sure the files exist at the specified location. | ||
Your paths will differ than the ones shown in the example below. If you get an error double check the paths making sure, or make sure that the `.ini` files are pointing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You paths will differ "from" the ones shown...
Hi Sterling,
Thanks for the feedback. Unfortunately, for the acoustics all those need to be generated for a complete analysis. I could further sort those in groups, so they are easier to sort through. Alternatively, I can add a checkbox to select whether to run the probabilistic and/or nonprobabilitic. I will talk with Sam regarding availability for me to work on these issues.
-Tim
Tim Nelson (he/him/his) | Project Scientist
Tel: 561.240.5096 | Cell: 803.319.3344 | St. Petersburg | FL
***@***.*** | Bio<https://www.integral-corp.com/staff/timothy-r-nelson-ph-d>
<https://www.integral-corp.com/>[cid:integral_1a04a855-2877-4c4f-bd98-b89de3950d0f.png]<https://www.integral-corp.com/>
________________________________
From: ssolson ***@***.***>
Sent: Wednesday, October 30, 2024 12:06 PM
To: sandialabs/seat-qgis-plugin ***@***.***>
Cc: Tim Nelson ***@***.***>; Mention ***@***.***>
Subject: Re: [sandialabs/seat-qgis-plugin] Acoustics module update (PR #34)
[CAUTION: External email. Think before you click links or open attachments.]
@ssolson requested changes on this pull request.
Tim apologies for my delayed review on this from the Hurricane/ Conference. I am finally catching up on everything. I am having a couple of issues/ questions with this module:
I think most importantly we need to address the crashing of QGIS/ SEAT and make sure the example results are up to date in the documentation. I am not going to address all the coding issues due to budget constraints.
SEAT causes QGIS to crash if:
1. If I click "weighting" or "Acoustic Metric" before anything else
2. If I type a non numeric value into "Acoustic Threshold Value"
3. If I run the acoustics module via a Load GUI then click the SEAT plugin again to run a different simulation
SEAT will crash:
1. If I click Save GUI Inputs then cancel
2. After running the Tanana river example I cannot see the QuickMapService
a. QuickMap will work before running the Tanana River example
b. QuickMap works on the Pacwave Example
c. Can you see QuickMap after running the example?
3. The Acoustics Results in PacWave example
a. The Results are unruly due to the results being shown for 14 Sea-states. Anyway you can think of to simplify?
b. Most of the results are a single solid color. Is this the correct output?
c. It looks like you guys updated the acoustics documentation inputs but not the outputs. Can you update the outputs you expect so I can be sure I am matching. Currently mine are very different from the previous results.
d. This example is really slow now on the order of 5 minutes to run. Is this expected?
________________________________
In seat/stressor_receptor_calc.py<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1750531253&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=sYF2giaeLDJahpmFezpM-KZRNbk36CMhjR4Ka7JM4H8&e=>:
@@ -386,15 +385,25 @@ def select_and_load_in(self) -> None:
self.test_exists(self.dlg.paracousti_device_not_present, fin, "Directory")
fin = config.get("Input", "paracousti probabilities file")
self.test_exists(self.dlg.paracousti_probabilities_file, fin, "File")
- fin = config.get("Input", "paracousti threshold file")
- self.test_exists(self.dlg.paracousti_threshold_file, fin, "File")
One of the tests is failing because you paracousti_threshold_value no longer comes from a file so we do not check for file existence any longer
________________________________
In docs/src/seat_qgis_plugin/acoustics/01_paracousti_preprocessing.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822811651&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=lYg_E0y869IhMA73odQFuJ4S8LUGqMFNepWn3dX_tjE&e=>:
@@ -0,0 +1,38 @@
+.. _01_paracousti_preprocessing:
+Paracousti Pre-Processing
+-------------------------
+Several metrics can be calculated from ParAcousti output that are useful in determining impacts to marine species. These include the weighted and unweighted sound pressure level (SPL) and sound exposure level (SEL). Due to the resource and time-intensive calculations, a stand-alone python routine is included within the SEAT package. This routine calculates the user selected metrics and weights form the existing Paracousti metrics. The calculated metrics are saved to a netcdf variable with the same dimensions as the original Paracousti netcdf.
form => from
________________________________
In docs/src/seat_qgis_plugin/acoustics/01_paracousti_preprocessing.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822814058&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=51ypySjTsX057yfIQ6To593caM1TUrx84oUb0jmzCoI&e=>:
+To run the Paracousti pre-processing routine,
+
+.. code-block:: python
+
+ from utils import paracousti_fxns
+ paracousti_path = r'./Path/to/Paracousti/netCDF'
+ save_path = r'./Path/to/save/updated/netCDF'
+ calc_paracousti_metrics(paracousti_path, save_path, weights="All")
This is really unclear on top of being a disjointed user experience. These functions should be accessible from the normal Paracousti or SEAT workflow, not some in between random function.
There is no budget to fix this at this point so going with this version:
For this to work the user will need to activate their qgis python environment. That has to be mentioned.
Is the paracousti_path and save_path above a file or a folder?
It is unclear to me if this is required to use the SEAT acoustics modules or not. Do I always need to run this pre-processing routine?
________________________________
In docs/src/seat_qgis_plugin/acoustics/02_inputs.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822881265&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=YlDIiuQMeIYfmj3an8M2NSuaMBOAf4CmEfn5IvKQ27A&e=>:
+^^^^^^^^^^^^^^^^^^^^^^
+
+The risk layer is a receptor file that serves as an additional input to each module and designates which layers are sensitive and would be affected by the acoustics. It must be a numerically classified .tif format, the same as what is used in the shear stress and velocity modules.
+
+.. figure:: ../../media/risk_layer_gui_input.webp
+ :scale: 100%
+ :alt: Risk Layer File
+
+ Represents a layer to evaluate change against. Examples include vegetation habitat, marine ecosystems, contaminated sediments, marine protected areas, or archaeological artifacts.
+
+- **File Type**: Supports geotiff (.tif) file format.
+
+ - **Geotiff Details**:
+ - Must have the same projection and datum as the model files.
+ - Will be nearest-neighbor interpolated to align with the model files' grid points (structured/unstructured).
+ - Must be integer classified, e.g., (0 = 'Kelp', 1 = 'Rock')
What about the "Depth Averaging" input?
________________________________
In docs/src/seat_qgis_plugin/acoustics/03_species_properties.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822916881&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=niS8ONP2sMDgM1rjrDxAp_4XJoQza-CF_9Z1RfrRYB4&e=>:
+Depth Averaging
+^^^^^^^^^^^^^^^^
+
+The Depth Averaging drop down box serves as an option to determine the depth sampling of the model results.
+
+.. figure:: ../../media/depth_avg.webp
+ :scale: 100 %
+ :alt: Temporal Averaging
+
+The depth selection options for acoustics are:
+
+1. **Depth Maximum**: Maximum value over depth.
+2. **Depth Average**: Mean value over depth.
+3. **Bottom Bin**: Value from bottom bin.
+4. **Top Bin**: Value from top bin.
In the GUI Depth Averaging is currently in inputs not the Species Properties sub Tab. Lets fix either the location in the GUI or location in the docs.
________________________________
In docs/src/tutorials/pacwave/acoustics.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822920209&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=pHwuWA2ZSWo0osv5jUzy_8Qjk4CWkVFLMfUxHDfUAsI&e=>:
+To run this demonstration, use the **Load GUI Inputs** button located at the bottom left of the SEAT GUI, navigate to :file:`DEMO_acoustics/pacwave/`, and there will be three files available to choose from:
+ - `acoustics_module_SEL_199db_threshold.ini`: Sound exposure level with a 199db threshold
+ - `acoustics_module_SEL_HFC_173db_threshold.ini`: Sound exposure level for high frequency creteceans with a 173db threshold
+ - `acoustics_module_SEL_LFC_199db_threshold.ini`: Sound exposure level for low frequency creteceans with a 199db threshold
I like the definition of what each demo is. We need to say which demo we are going to run for the outputs below and update the outputs to match.
________________________________
In docs/src/tutorials/pacwave/acoustics.rst<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23discussion-5Fr1822921611&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=yKI3i1RZ14J557K07Rerd-Uxh2iNQgoPe0bzGPjTyhg&e=>:
.. Note::
- Your paths will differ than the ones shown in the example below. If you get an error double check the paths making sure the files exist at the specified location.
+ Your paths will differ than the ones shown in the example below. If you get an error double check the paths making sure, or make sure that the `.ini` files are pointing
You paths will differ "from" the ones shown...
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23pullrequestreview-2D2290341764&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=fhlpNpd78FGxZW9Ag6pr-pINklnuvJeBDG_otnBTfuU&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AZARDBJZLXDXAHZL2KRQE2TZ6D7XLAVCNFSM6AAAAABJ6TD5U2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEOJQGM2DCNZWGQ&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=lsXhRFpP1M9mE18WC7A670ziY01dpNCR8Hm6CJmz7gabPN74G_YkNcrlLjKg1JQ9&s=hgKCoGPsrYFzPkDIK1dmLESmCqzW2V2gBa99903Fz8M&e=>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Tim your response is puzzling. I think you are replying to maybe the least important issue. Most important:
|
Hi Sterling,
I had lumped those into the issues comment and will talk with Sam regarding fixing the crashing bug fixes. I will also reach out to Ashely to see if she had an update to the documentation that didn't get merged. I am off tomorrow so it will be early next week before I am able to address some of these issures. I will keep you updated.
-Thanks,
-Tim
Tim Nelson (he/him/his) | Project Scientist
Tel: 561.240.5096 | Cell: 803.319.3344 | St. Petersburg | FL
***@***.*** | Bio<https://www.integral-corp.com/staff/timothy-r-nelson-ph-d>
<https://www.integral-corp.com/>[cid:integral_1a04a855-2877-4c4f-bd98-b89de3950d0f.png]<https://www.integral-corp.com/>
…________________________________
From: ssolson ***@***.***>
Sent: Thursday, October 31, 2024 11:11 AM
To: sandialabs/seat-qgis-plugin ***@***.***>
Cc: Tim Nelson ***@***.***>; Mention ***@***.***>
Subject: Re: [sandialabs/seat-qgis-plugin] Acoustics module update (PR #34)
[CAUTION: External email. Think before you click links or open attachments.]
Tim your response is puzzling. I think you are replying to maybe the least important issue.
Most important:
* Using the SEAT version in this PR is causing QGIS to crash
* The outputs to the documentation are outdated and I do not know what is correct.
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_34-23issuecomment-2D2450130420&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=bWI1OMYrYEKRS77VrAhyhM7PXPR-znXBzOxKnImcczaj6XqeRcNYKrD_usnccKwg&s=52iTDfQP2GoaYefesOYfEDw1w570CYCqIrj_B0vlQi0&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AZARDBM423LXHNJXLAYGSETZ6JCA7AVCNFSM6AAAAABJ6TD5U2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJQGEZTANBSGA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=bWI1OMYrYEKRS77VrAhyhM7PXPR-znXBzOxKnImcczaj6XqeRcNYKrD_usnccKwg&s=wmqaWsg332DH_VwRhVdaXtV34eMACHA3GKeM2ugk1_E&e=>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This is still undergoing review. I will send you an email once this is ready. |
Thanks Tim. |
Start of Acoustics Module update for weighting and exposure level.