Pylinac WLTH with SunNuclear phanton

Hey,

I irradiated the Sunnuclear multimet phantom in Trilogy, but the analysis in Pylinac using the WinstonLutzMultiTargetMultiField library isn’t working.
The images I’m using are with the gantry combinations required by the SunNuclear software.

However, for some reason he can’t see BB2 and BB5 in the image, and he can’t find any relationship between the BBs and the isocenter using the arrangement below.

my_special_phantom_bbs = [
BBConfig(
name=“BB1”,
offset_left_mm=0,
offset_up_mm=-60,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
BBConfig(
name=“BB2”,
offset_left_mm=-30,
offset_up_mm=-45,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
BBConfig(
name=“BB3”,
offset_left_mm=0,
offset_up_mm=30,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
BBConfig(
name=“Iso-BB4”,
offset_left_mm=0,
offset_up_mm=0,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
BBConfig(
name=“BB5”,
offset_left_mm=30,
offset_up_mm=-20,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
BBConfig(
name=“BB6”,
offset_left_mm=0,
offset_up_mm=-40,
offset_in_mm=0,
bb_size_mm=5,
rad_size_mm=10,
),
]

When I run wl.analyze(bb_arrangement=my_special_phantom_bbs, is_open_field=True), this is the result that appears:

[image]

Since the irradiations for the Sun Nuclear are separated, there are 6 images showing all 6 BBs and 4 images showing the irradiations divided (2 showing 4 BBs and 2 showing 2 BBs) for the combinations G270C90M0 and G9C90M0.
And when I try to use MultiMet’s ready-made BB arrangement (BBArrangement.SNC_MULTIMET), the error “the number of detected fields and BBs do not match”) appears.

If you could help me, that would be amazing.

Hi,
we are using the SNC Phantom with pylianc on our TrueBeam with success. Which pylinac Version are you using? We are still on 3.31.0 in our QATrack+.

When troubleshooting the normal Winston Lutz errors I sometimes had to test which image pylinac is not able to analyze by removing one image after another and then open the file in a DICOM Viewer. In most cases we had just terrible image qualitiy. Maybe that could help you track down which image is not being analyzed.

Hi, thank you very much for your reply and response.

I’m using the MLCHD in tirlogy and it can’t associate the pre-set positions of BBArrangement.SNC_MULTIMET with the DICOM images. The error that appears is:

“The number of detected fields and BBs do not match.”

I’m wondering if it’s related to the fact that I created the treatment plans instead of using the ones set by SunNuclear, and I irradiated the zeroed phantom on BB4 instead of BB3.

I’m using this Pylinac library from pylinac import WinstonLutzMultiTargetMultiField

When I check the isocenter BB, it succeeds and returns the result but the displaced BBs do not…

Winston-Lutz Multi-Target Multi-Field Analysis

Number of images: 6

2D distances

Max 2D distance of any BB->Field: 1.15 mm
Mean 2D distance of any BB->Field: 0.57 mm
Median 2D distance of any BB->Field: 0.49 mm

BB#Description


BBiso Left 0.0mm, Up 0.0mm, In 0.0mm

Image G C P BBiso


G0C0M0.dcm 0 0.1 0 0.42
G0C90M0.dcm 0 90 0 0.46
G0C270M0.dcm 0 270 0 0.52
G0C0M90.dcm 0 359.9 270 0.58
G180C90M0.dcm 180 90.1 0 1.15
G0C0M270.dcm 359.9 0 90 0.26

Image Couch Angle Yaw Error (°)


G0C0M0.dcm 0 -0
G0C0M90.dcm 270 -0
G0C0M270.dcm 90 -0

Hi,
thanks for clarifiying your workflow. If you do not use the “official” Iso BB as the Iso BB you have, as you already tried, to use a custom BB arrangement. Your arrangement seems to be not correct. The offset_up is for couch vertical shifts.
Here is the original arrangement from pylinac for the SNC Phantom:

    SNC_MULTIMET = (
        BBConfig(
            name="Iso",
            offset_left_mm=0,
            offset_up_mm=0,
            offset_in_mm=0,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
        BBConfig(
            name="1",
            offset_left_mm=0,
            offset_up_mm=0,
            offset_in_mm=30,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
        BBConfig(
            name="2",
            offset_left_mm=-30,
            offset_up_mm=0,
            offset_in_mm=15,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
        BBConfig(
            name="3",
            offset_left_mm=0,
            offset_up_mm=0,
            offset_in_mm=-30,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
        BBConfig(
            name="4",
            offset_left_mm=30,
            offset_up_mm=0,
            offset_in_mm=-50,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
        BBConfig(
            name="5",
            offset_left_mm=0,
            offset_up_mm=0,
            offset_in_mm=-70,
            bb_size_mm=5,
            rad_size_mm=20,
        ),
    )

I am not sure what BB3 and BB4 are for you, but I would just use the SNC Plans and user the same BB as the ISO BB to keep it simple. After you tested that this works for you you could the advance and try with a custom BB arangement/other ISO BB.

Hello,

Thank you very much for the clarification.

As suggested, I irradiated the Sun Nuclear MultiMet phantom on an Elekta linear accelerator with Agility MLC, using the treatment planes provided by Sun Nuclear. I exported all DICOM images and loaded them into Pylinac using:

wl = WinstonLutzMultiTargetMultiField.from_zip(“/content/MultiMet 17-01-2025-20260304T164442Z-1-001.zip”)

And analyzing:

wl.analyze(bb_arrangement=BBArrangement.SNC_MULTIMET, is_open_field=True)

I’m not using a custom BB array at this time — I’m using the original BBArrangement.SNC_MULTIMET exactly as defined in Pylinac (the configuration you pasted below).

Even using the standard SNC_MULTIMET array, I still get the error:

ValueError: The number of detected fields and BBs does not match

This is why I’m confused—I’m not modifying the offsets or using a custom ISO BB. Why isn’t it parsing?

Thank you again for your help—I greatly appreciate the guidance.

Sincerely,
Giulia

Hi,
I noticed that you are using is_open_field=True which should only be used with open fields (like kV Images) and not with “normal” irradiation field.
Also which machine scale do you use? It looks like the file names do not match the reported values which might be a problem with matching the BBS to the correct fields. It is possible to give a specific machine scale.

Hi,

Thank you for your message.

Regarding the machine scale, since I am using the original .dcm files exported directly from the Varian system, I assumed that the scale was already correct, as expected in the source code implementation.

Do you think that a machine scale mismatch could also interfere with the calculated coordinates of the BBs? If so, could you suggest how I could verify which scale is being interpreted by Pylinac and how to modify it for testing?

Thank you for your help.

new_gantry, new_coll, new_couch = convert(
input_scale=MachineScale.Varian,
output_scale=MachineScale.IEC61217,
gantry=gantry,
collimator=coll,
rotation=couch,
)

Hi,

I just checked my Truebeam DICOM files and I was not able to find any hint on the used scale (we use VarianIEC). If you use any other scale than the one expected by pylinac you have to convert (therefore the option in the analyze function).


I found your image on the pylinac mailing list. There are some kind of artifacts in the image (the dark spots above and below the BBS), they might also cause problems. Are you using the latest pylinac version or at least one greater than 3.32? There were some improvements: Changelog - pylinac 3.42.0 documentation

Hii,

Thank you for checking and for the information. I will verify these points and try again.

Thanks for your help.