REPLACENANS

Replaces NANs with NoData or specified value


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example

Back to top

Description


To replace all NANs with a specified value or the default NoData value found in the metadata.
Back to top

Parameters


replacenans(file, dbic, newval)

Name Type Caption Length Value range
FILE * str Input file. 1 -    
DBIC List[int] Input raster channel 0 -   Default: 1
NEWVAL str 0 -  

* Required parameter
Back to top

Parameter descriptions

FILE

>Name of file in which all NANs will be replaced with the NoData value or some other specified value.

C:/pixfile.pix

DBIC

Complex and real channels are supported.

NEWVAL

If NEWVAL = nodata, and nodata is not defined at the file level or at the channel level, the PPF will error.
Back to top

Details

Back to top

Example

Default, replaces nans with nodata.

from pci.replacenans import replacenans

file="file.pix"						#File to have nans replaced
dbic=[]									#select channel, default 1st channel
newval=""									#specify value to replace NANs, defualt NoData

replacenans(file, dbic, newval)
			

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.