# Automatically determining the Multiplier factor in Falsecolour

This is my old workflow:

1. Take raw illuminance pic from IESVE software
2. Postprocess this pic into a Daylight factor Falsecolour
3. place compliance area over the top of each room on a plan.

Currently I’m trying to recreate this .pic conversion outside of IESVE to a daylight factor Falsecolour, and would like to understand if there is a way around manually inserting a multiplier (-m) (See “scaling_factor” in python code). Is there a way to automatically determine the multiplier in order to gain the exact output DF Falsecolour image from IESVE software.

PYTHON CODE

``````def convert_to_falsecolor_and_gif(input_pic):
"""
Convert the .pic file to a falsecolor image and then to a GIF image.
Handles scaling based on the lux value of the (0,0) pixel and creates the output files.
"""
try:
scaling_factor = calculate_scaling_factor(input_pic)

input_dir = os.path.dirname(input_pic)
intermediate_falsecolor_pic = os.path.join(input_dir, 'intermediate_falsecolor3.pic')
output_tiff = os.path.join(input_dir, 'output_image2.tif')

falsecolor_command = [
'falsecolor',
'-ip', input_pic,
'-s', '4',  # Set the scale value
'-m', str(scaling_factor / 10000 * 100),  # 10,000 is for a 10K lux overcast sky
'-n', '10',  # Show only 10 divisions
'-l', 'DF(%)',  # Label the chart
'-pal', 'spec'  # Use old spectral color map explicitly
]

with open(intermediate_falsecolor_pic, 'wb') as output_file:
subprocess.run(falsecolor_command, stdout=output_file, check=True)
print(f"Converted {input_pic} to {intermediate_falsecolor_pic} using falsecolor.")

# Convert to TIFF using ra_tiff
ra_tiff_command = ['ra_tiff', intermediate_falsecolor_pic, output_tiff]
subprocess.run(ra_tiff_command, check=True)
print(f"Converted {intermediate_falsecolor_pic} to {output_tiff} using ra_tiff.")
``````

GETINFO output of IESVE .PIC image

C:\VE Projects\1761A\Run 1\images\G_RevB.pic:
OCTREE=G_RevB.oct
rpict -w -vtl -vp 52.825 -30.925 118.450 -vd 0 0 -1 -vu 0 1 0 -vh 97.000 -vv 67.000 -x 1280 -y 1280 -ps 4 -pt 0.05 -pj 1.0 -dj 0.70 -ds 0.15 -dt 0.00 -dc 1.00 -dr 3 -dp 512 -st 0.15 -ab 8 -aa 0.10 -ar 1024 -ad 4096 -as 1024 -lr 16 -lw 0.00200 -t 1 -i -af C:\Users\AppData\Local\IES\tasks\2956\2957\radiance\image18.amb -e C:\Users\AppData\Local\IES\tasks\2956\2957\radiance\image18.log
SOFTWARE= RADIANCE 5.1a lastmod by iesvepalbinder.sandher on SANDHER7
VIEW= -vtl -vp 52.825 -30.925 118.45 -vd 0 0 -1 -vu 0 1 0 -vh 97 -vv 67 -vo 0 -va 0 -vs 0 -vl 0
CAPDATE= 2024:06:13 07:09:17
GMT= 2024:06:12 21:09:17
FORMAT=32-bit_rle_rgbe
pfilt -x /2 -y /2
EXPOSURE=1.500574e-001

Hi Vin,

Welcome to the forum.

I am not sure who on here is an IESVE expert, I just know I am not. However, I understand the general principle behind computing daylight factors, where the interior illuminance is divided by the simultaneous exterior illuminance for an overcast sky. Thus, the -m multiplier you speak of must be set to correspond to the sky brightness set in your simulation. The gensky command with the -c option generates an overcast sky, and setting the -B option, you can specify the ground-plane irradiance. If you divide your interior irradiance values by your -B setting, it should give you daylight factor. Thus, the mulitplier should be the reciprocal of this setting.

Not sure if this helps.
-Greg