The code that "copy as python command" copies:
output_raster = arcpy.ia.RasterCalculator('Con(IsNull("OMUVBd_003_UVindex_Layer1"), FocalStatistics("OMUVBd_003_UVindex_Layer1", NbrRectangle(25,25, "CELL"), "MEAN"), "OMUVBd_003_UVindex_Layer")'); output_raster.save(r"c:\Users\custom pc\documents\ArcGIS\Projects\srp\srp.gdb\onedayinterpolation12")
What it actually is doing: Using Con and isNull and NbrRectangle to interpolate null values. I'm also going to attempt something similar with just turning null values into 0. Both of these are simple in the RasterCalculator, and yet I can't turn this into code, which I need to do 5000 times, so I'm a bit lost. I got RasterCalculator to work with simple arithmetic (an average), but in making the expression I'm completely lost, as 'Con(IsNull("OMUVBd_003_UVindex_Layer1"), FocalStatistics("OMUVBd_003_UVindex_Layer1", NbrRectangle(25,25, "CELL"), "MEAN"), "OMUVBd_003_UVindex_Layer")'
doesn't work and neither does the same where all file names are replaced with x, which is preceded by the rasters field being [name of raster in string] and input_names field being ["x"].
I'm not really looking for a different solution to my problem, although I will take that if necessary. Ideally, I will just figure out how to use Con(isNull()). Also, https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/con-.htm suggests that Con is its own function, which confuses me even more and I really need some guiud