Pixelmath normalization

I came across this on the Internet but when I try it produces an image that is exactly the same as the image I am trying to normalize against the reference image. Are there any pixelmath geniuses on here who could tell me what I am doing wrong?

In Siril, Pixel Math does not automatically normalize images, as its input variables are treated as values between 0 and 1, but you can perform normalization manually within the Pixel Math tool to scale images to specific ranges for processing or creation of new images. To normalize, you define a normalization formula, load your images as variables, and apply the formula by entering the normalized image name and hitting the apply button, as shown in the example formula: image2 = (image*mad(ref)/mad(image)-mad(ref)/mad(image)*median(image))+median(ref).)

How to Normalize Using Pixel Math in Siril

Open Pixel Math: Go to the Siril menu and select “Pixel Math”.

Load Images: Click the “+” button to load the images you want to normalize. Give them clear variable names, for example, image and ref.

Enter the Formula: In the formula entry box, type your desired normalization formula. An example for normalizing image against a ref image is provided below:

Code

(image*mad(ref)/mad(image)-mad(ref)/mad(image)*median(image))+median(ref)

image: The image you want to normalize.

ref: The reference image to normalize

mad() and median(): These are statistical functions that can be used to determine a reference value for normalization.

Apply the Formula: Click the “apply” button to execute the formula and create the new normalized image, which can saved as image2 in this example.