sandialabs / seat-qgis-plugin

Spatial Environmental Assessment Toolkit (SEAT) QGIS Plugin
https://sandialabs.github.io/seat-qgis-plugin/
GNU General Public License v3.0
1 stars 7 forks source link

Adds secondary constraint to shear and velocity modules #30

Closed tnelson-integral closed 10 months ago

tnelson-integral commented 11 months ago
ssolson commented 11 months ago

Tim I get the following error:

KeyError: 'Risk' 
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3652, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas\_libs\index.pyx", line 147, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 176, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Risk'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users/sterl/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\seat_qgis_plugin\stressor_receptor_calc.py", line 580, in run
    rskstylefile = stylefiles_DF.loc['Risk'].values.item(
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\indexing.py", line 1103, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\indexing.py", line 1343, in _getitem_axis
    return self._get_label(key, axis=axis)
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\indexing.py", line 1293, in _get_label
    return self.obj.xs(label, axis=axis)
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\generic.py", line 4095, in xs
    loc = index.get_loc(key)
  File "C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3654, in get_loc
    raise KeyError(key) from err
KeyError: 'Risk'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.32.3-Lima Lima, 67d46100b5 

Python Path:
C:/PROGRA~1/QGIS33~1.3/apps/qgis/./python
C:/Users/sterl/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/sterl/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS33~1.3/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS33~1.3\apps\grass\grass83\etc\python
C:\Users\sterl\Documents
C:\Program Files\QGIS 3.32.3\bin\python39.zip
C:\PROGRA~1\QGIS33~1.3\apps\Python39\DLLs
C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib
C:\Program Files\QGIS 3.32.3\bin
C:\Users\sterl\AppData\Roaming\Python\Python39\site-packages
C:\PROGRA~1\QGIS33~1.3\apps\Python39
C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\Pythonwin
C:/Users/sterl/AppData/Roaming/QGIS/QGIS3\profiles\default/python

When running DEMO_structured/shear_stress_with_receptor.ini related to the new Risk parameter.

tnelson-integral commented 11 months ago

I need to update the DEMO files since the style files do not currently include a risk style.

tnelson-integral commented 10 months ago

I pushed a bug fix commit. Demo files have also been updated. Please update the styles file folder, the habitat folder in "DEMO structured" and the .default files in "DEMO structured" and "DEMO unstructured" folders.

ssolson commented 10 months ago

@tnelson-integral going over the demos today I notice that for the unstructured demo if I use shear_stress_with_receptor,ini I get a "risk" result. However, for velocity_with_receptor.ini I do not get the risk result. Is this expected?

tnelson-integral commented 10 months ago

Yes, the risk calculation only applies to shear stress so there is no risk result for velocity or paracousti. -Tim

Tim Nelson (he/him/his) | Project Scientist Tel: 561.240.5096 | Cell: 803.319.3344 200 2nd Ave. S, #155 | St. Petersburg | FL 33701 @.*** | www.integral-corp.com

[cid:integral-logo_bb8ba854-3124-462b-8a66-06670ee4325c.jpg]


From: ssolson @.> Sent: Monday, December 18, 2023 12:29 PM To: sandialabs/seat-qgis-plugin @.> Cc: Tim Nelson @.>; Mention @.> Subject: Re: [sandialabs/seat-qgis-plugin] Adds secondary constraint to shear and velocity modules (PR #30)

[CAUTION: External email. Think before you click links or open attachments.]

@tnelson-integralhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tnelson-2Dintegral&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=YCI7n4Wo0uCa9eEE0RJEWKZjIxfBu05JapN05SSPUcYdnOQQN8Sg807rz8TaH6QG&s=d1rl13XAPuuSx6U-9-z8gUUq5W13--hNT-cXz1YutZk&e= going over the demos today I notice that for the unstructured demo if I use shear_stress_with_reception I get a "rsik" result. However, for velocity_with_receptor I do not get the risk result. Is this expected?

— Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sandialabs_seat-2Dqgis-2Dplugin_pull_30-23issuecomment-2D1861132712&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=YCI7n4Wo0uCa9eEE0RJEWKZjIxfBu05JapN05SSPUcYdnOQQN8Sg807rz8TaH6QG&s=qRZNNRCKWnCr5fCrzS-SuqAmUHtQT8N8rjduhTlZckg&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AZARDBNZX6QXOV7C6G7YVV3YKB4ONAVCNFSM6AAAAABALN7SG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRGEZTENZRGI&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=2OT5Kb-Guh1vdHPYH_OKgQqqKZs-WcstcKgpghDlHN8&m=YCI7n4Wo0uCa9eEE0RJEWKZjIxfBu05JapN05SSPUcYdnOQQN8Sg807rz8TaH6QG&s=ZXFkyxqvUK_i_cyG-fMfxzXmH-9gIJ0wRskUMu2SmLQ&e=. You are receiving this because you were mentioned.Message ID: @.***>