Skip to content

Commit 25a90d4

Browse files
committed
Fix depth adjBy
1 parent f36a853 commit 25a90d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pingmapper/class_portstarObj.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ def _saveDepth(self,
14541454
starInstDepth = savgol_filter(starInstDepth, 51, 3)
14551455

14561456
if adjDep != 0:
1457-
adjBy = self.port.pixM*adjDep
1457+
adjBy = adjDep
14581458
portInstDepth += adjBy
14591459
starInstDepth += adjBy
14601460

@@ -1478,8 +1478,8 @@ def _saveDepth(self,
14781478
portDF['dep_m_smth'] = smthDep
14791479
starDF['dep_m_smth'] = smthDep
14801480

1481-
portDF['dep_m_adjBy'] = str(adjDep) + ' pixels'
1482-
starDF['dep_m_adjBy'] = str(adjDep) + ' pixels'
1481+
portDF['dep_m_adjBy'] = str(adjDep / self.port.pixM) + ' pixels'
1482+
starDF['dep_m_adjBy'] = str(adjDep / self.port.pixM) + ' pixels'
14831483

14841484
elif detectDep > 0:
14851485
# Prepare depth detection dictionaries
@@ -1546,7 +1546,7 @@ def _saveDepth(self,
15461546
starDF['dep_m'] = starFinal
15471547

15481548
if adjDep != 0:
1549-
adjBy = self.port.pixM*adjDep
1549+
adjBy = adjDep
15501550
portDF['dep_m'] += adjBy
15511551
starDF['dep_m'] += adjBy
15521552

@@ -1560,8 +1560,8 @@ def _saveDepth(self,
15601560
portDF['dep_m_smth'] = smthDep
15611561
starDF['dep_m_smth'] = smthDep
15621562

1563-
portDF['dep_m_adjBy'] = str(adjDep) + ' pixels'
1564-
starDF['dep_m_adjBy'] = str(adjDep) + ' pixels'
1563+
portDF['dep_m_adjBy'] = str(adjDep / self.port.pixM) + ' pixels'
1564+
starDF['dep_m_adjBy'] = str(adjDep / self.port.pixM) + ' pixels'
15651565

15661566
# Export to csv
15671567
portDF.to_csv(self.port.sonMetaFile, index=False, float_format='%.14f')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy