MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / normalize

Function normalize

utils/common.py:2048–2050  ·  view source on GitHub ↗

Scale from [0, 1] to [-1, +1]

(x)

Source from the content-addressed store, hash-verified

2046
2047
2048def normalize(x):
2049 """Scale from [0, 1] to [-1, +1]"""
2050 return x * 2 - 1
2051
2052def get_mask(metric, min_depth=0.01, max_depth=50.0):
2053 mask = (metric > min_depth) & (metric < max_depth)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected