{'fraction_non_alphanumeric': 0.02562519296079037, 'fraction_numerical': 0.014201914171040445, 'mean_word_length': 4.74423645320197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
X-ray imaging: A potential enabler of automated particulate detection and cake-structure analysis in lyophilized products?

The presence of particulate matter in parenteral products is a major concern since it affects the patients' safety and is one of the main reasons for product recalls. Conventional quality control is based on a visual inspection, which is a labour-intensive task. Limited to clear solutions and the surface of lyophilised products, it cannot be applied to opaque containers. This study assesses the application of X-ray imaging for detecting the particulate matter in a pharmaceutical lyophilized product. The most common types of particulates (i.e., steel, glass, lyo stopper, polymers and organics in different size classes) were intentionally spiked in vials. After optimizing all relevant parameters of the X-ray set-up, all classes of particulates were detected. At the same time, due to contrast enhancement, the inherent structures of lyophilized cake became obvious. This work addresses the potential and limits of X-ray technology in that regard, paving the way for automated image-based particulate matter detection. Moreover, this paper discusses using this approach to predict critical quality attributes (CQAs) of the drug product based on the cake structure attributes.


Introduction
Parenteral dosage forms gain more and more importance in connection with new therapies in the biopharmaceutical field. Lyophilisation is a widely applied method of transforming biologically active pharmaceutical ingredients (APIs) from a liquid state into a stable solid, enabling transport in a broader temperature range and extending shelf life. Clearly, the conditions during freeze-drying (lyophilization) have a major impact on some of the drug product's critical quality attributes (CQAs), such as the physical appearance of the dried cake, including its density, colour, uniformity, shrinkage, collapse and melt-back traces. In addition, the quality of the reconstituted parenteral strongly depends on the lyophilisation process as well. In the filling line particulate matter may enter the drug product at any time, until the container is sealed in the last step of lyophilisation. A manufacturing process contains several potential sources of impurities and there are multiple categories of particulate matter (Langille, 2013). Particulates can for example originate from the formulation itself and may affect the effectiveness, shelf life and reconstitution. This category includes protein agglomerates, which are common in high-concentration protein formulations as well as melt-back and cake collapse defects. "Intrinsic" particulates emerge from the process due to the wear and abrasion of machinery, glass containers and lyo stoppers. They are considered sterile due to their origin in the controlled manufacturing environment. "Extrinsic" impurities are introduced into the product from the outside of the process. Potential sources of those are scurf and hair, textile fibres and insects, which may carry bioburden and toxic substances. Besides toxicity and infectivity, the particulate matter can directly harm organs, blood vessels and tissue (Puntis et al., 1992), especially in severely sick patients (Lehr et al., 2002).
Due to a high risk to the patients' safety, much effort has been dedicated to detecting particulate matter in lyophilized products. Conventional quality control includes a visual inspection of every container, as required by the United States Pharmacopeia (United States Pharmacopeia <1>, 2021;United States Pharmacopeia <790>, 2021). To that end, the containers are examined manually against a white and black background by specially trained operators. This method is timeconsuming, cost-intensive and prone to human error. Semi-automated and automated inspection machines based on multiple imaging systems are available (Seidenader, 1994;Lehmann, 2012). Since training data sets are required for calibration and validation, the detection is only possible for common and well-known impurities. An attempt to automate image classification via deep learning was made by Tsay and Li (2019). However, any conventional inspection method is limited to particles within the visible size range in the order of 50-100 μm that are located close to the surface of the cake. It has recently been shown that the particulate matter is not limited to visible zones, but can also be found inside the lyophilized product (Poms et al., 2019). Therefore, methods for investigating the complete cake are essential. According to the regulatory requirements (USP <790>), destructive searching in a specific number of samples per batch is the alternative. This also requires much effort and, if multiple particles are found, the entire batch must be discarded. Detecting one particle triggers an investigation and only if the particle can be attributed to reconstitution or inspection, discarding can be prevented.
A number of analytical methods is available for assessing the quality attributes of lyophilized proteins, such as molecular weight, concentration, size, structure and stability (Wahl et al., 2016;Butreddy et al., 2021). Hindelang et al. (2018) showed that a combination of infrared (IR), Raman and energy disperse X-ray (EDX) spectroscopies is a powerful tool for investigating and determining contaminations, as well as for a root cause analysis of their origin. Due to their nature and effort involved in sample preparation, these methods are not feasible for detection purposes and are limited to off-line analysis. Although some studies on process analytical technologies were performed, their focus was on process monitoring rather than on impurity detection. NIR spectroscopy was implemented in a freeze-drying process to measure residual moisture (Kauppinen et al., 2014), physicochemical changes, such as crystallization and sublimation start, and for identification of polymorphs (Rosas et al., 2014). Solid state, stage of the process and onset of various crystallization phases were monitored by means of Raman spectroscopy (De Beer et al., 2007). It was shown that impedance spectroscopy can be used for determining the drying rate and the process end point (Smith et al., 2013). A recent review (Achouri et al., 2021) indicates that most technologies with potential for in-process application are limited to food processing or have some drawbacks hindering their in-line detection capabilities.
Due to its penetration depth, fast acquisition rate and high resolution, X-ray imaging is the most promising technology for the detection of particulate matter within the full volume of a container. It is based on the differences in the image contrast caused by differences in the absorption of passing X-ray photons. The intensity of X-ray beam is attenuated from any material in the cone and follows the Beer-Lambert law, with an exponential decrease along the penetration length. The amount of absorption depends on the density, size and attenuation coefficient of the material. The element-specific attenuation coefficient depends on the X-ray energy and is proportional to the atomic number Z 4 . High-contrast images of metal particulates and low-contrast images for polymers and organic compounds are generated.
By means of grating based multimodal X-ray imaging Einarsdottir et al. (2016) were able to detect organic materials such as wood, insects and soft plastics with a smallest size of 2 mm in different kinds of food. In the described method gratings were used after the source, the sample and before the detector. With this kind of set-up in addition to attenuation, phase contrast and dark field imaging effects are used. In another study (Nielsen et al., 2013) X-ray dark-field imaging with a grating interferometer allowed detection of paper and insects of several mm in size in beef.
While X-ray-based commercial scale inspection equipment is currently available for pharmaceutical products, scientific studies on the detection limits are focused on food quality control. During freezedrying of drugs, many effects can stress the lyophilized product (Butreddy et al., 2021). Moreover, the internal cake structure is influenced by freeze-drying parameters (Tejedor et al., 2020). Internal structures are in many cases inherent phenomena, which can pose a significant challenge for automated impurity detection.
In this study, X-ray imaging was optimized for contrast enhancement. Detection performance of the most common types of particulate matter was assessed, specifically for the pharmaceutical lyophilized cake. Particulate classes involved included steel, glass and polymers, as well as impurities of organic origin, such as hair and a spider leg. In addition, the feasibility of X-ray imaging in term of measuring the internal cake structure was assessed.

Experimental set-up
The X-ray tests were executed in a desk-sized unit constructed inhouse, which allows an easy change of detector and geometry. Fig. 1 shows the main parts of the equipment. During operation, the set-up was secured with radiation-safe housing. An X-ray micro focus tube Vari-Blast 0.080 MBCFF30 (Petrick, Germany) with a maximum power rating of 50 W was installed on the right side. The highest applicable voltage was 50 kV, and the current of the filament was 1 mA. The X-ray spectrum was emitted from a tungsten target enclosed in a glass tube with a Beryllium window. The focal spot size was 35-55 μm. To reduce the spot size and prevent instability in the current regulation control circuit, the tube was operated below 900 μA. A flexible mounting support in the center allowed fast positioning of the vials at variable angles and distances to the tube. The vials were mounted top down and fixed on their necks. The detector was placed on the flexible slide on the left and connected to the frame grabber on a nearby PC using a radiationprotected feedthrough.
A Dexela 1207N-C16-HRCC (Perkin Elmer, Germany) 14-bit high dynamic range CMOS detector was used in this study. The sensor has 1536 × 864 pixels with a 75 μm pixel pitch (distance between sensor pixels), which cover an active area of 115 × 65 mm. A high resolution caesium iodide HRCC scintillator stack with a carbon layer on top was directly grown and manufactured on the CMOS chip, converting X-rays into visible light. The detector was calibrated for each set of experimental parameters via dark and flood images. The dark images were taken without the X-ray source after warming-up the equipment to consider thermal and static noise in the imaging system. Flood images are white reference images that compensate for different pixel responses and the vignetting, which is the reduction of brightness towards the image edges. The latter is caused by the radial intensity decrease along the cone beam of the tube and by the anode heel effect. To avoid oversaturation of the detector, for a specific combination of voltage and exposure time, the tube current was reduced to keep the intensity on the detector below 13,000 counts. To minimize noise, at least 120 frames were recorded in each calibration setting and averaged. In addition, bad pixel maps were generated before all experimental runs to ensure the recognition of false detections.

Lyophilization and particulates
Samples of the major classes of particulate matter identified via the process failure mode and effects analysis (PFMEA) (Poms et al., 2019) were prepared. Glass vials (Schott, Germany) were crushed in a ball mill PM 100 (Retsch, Germany). Lyo stoppers of isobutylene isoprene rubber (Daikyo Seiko, Japan), a tube of medical Teflon (PTFE) and polyethylene (PE) were ground in a Cryo Mill (Retsch, Germany) tempered by liquid nitrogen. Stainless steel particles were produced using a file. Human hair and a dead spider were collected from the environment. In addition to the defined main particulate classes, nylon strings were cut from a fishing line as an easy-to-handle sample of known diameter. Steel, glass and metal particles were separated into size classes of 0-80 μm, 80-100 μm, 100-160 μm, 160-250 μm, 250-400 μm and above using a sieving machine AS 200 (Retsch, Germany). Four classes from 80 μm to 400 μm were applied in further investigations. The lower limit of 80 μm was selected to resemble the detection limit of the naked eye. The human hair and a leg of the dead spider were 80-90 μm and 80-100 μm thick, respectively. Nylon strings with a thickness of 80-120 μm were employed.
The lyophilized product was prepared from human serum albumin, which was dissolved in water for injection at a concentration of 50 g/l together with 4.4 g/l sodium chloride. 5 ml of the solution were filled into washed and sterilized 6 ml 6R vials via a sterile filtering pipette (Eppendorf, Germany) and subsequently lyophilized in a SP scientific pilot freeze dryer (Westminster, USA). Before lyophilisation, the solution in the vials was spiked with the particulate matter. The particles were placed either in an empty vial before filling or on top of the solution after filling. Small particulates remained on the top position due to the surface tension. The hair, spider leg and nylon strings were placed in the vertical direction. Particles smaller than 250 μm were applied with glass pipettes in a bulk utilizing adhesion. Larger particles and fibres were individually placed using tweezers.

Reference analytics
To visualize the internal cake structure, micro computed X-ray tomography (μCT) was performed on a Bruker Skyscan 1172 (Bruker, USA) with single vials. The system has a micro focus tube with 10 W power and a variable voltage of 20-100 kV. The whole lyophilized cake was scanned with an interval of 0.4 • resulting in 483 frames. The acquisition time per scan was 58 s resulting in a total measurement duration of 7:49 h, which makes this method only feasible for reference.
The effective radiation dose during X-ray imaging inside an inspected vial was measured as Entrance Surface Air KERMA using a Nomex dosimeter system with R/F/D detector 60,004 (PTW, Germany). The detector was placed in a 100H vial.

Results and discussion
To detect small particles, especially materials made of light chemical elements, it is important to optimize the image generation parameters. In this study the influence of voltage, exposure time and magnification was investigated.
The amount of voltage applied affects the emitted energy spectrum of the tube and should overlap with a high attenuation coefficient of the specimen and range of high quantum efficiency of the detector. It was varied between 30 kV and 42 kV, which was estimated to be the optimum range for the image contrast in preliminary tests. Considering a small focus spot size and to compare the results, the tube current was set to reach the same count levels in the image at the particulate position at each voltage level. To qualify the particulate detection, line plots were used with the raw sensor counts displayed as grey values over a line on the sensor represented by a number of pixels. A vial containing a nylon string with a thickness of 120 μm was used in the tests. Fig. 2 shows an Xray image of the vial and normalized line plots for various voltages. The nylon string is hardly visible as a fine line crossing the vial from top left to bottom right. Each line in the figure represents the average of five consecutive pixel columns of the sensor, which is indicated as a red box in the X-ray image of the vial. Averaging was performed to supress some noise. The counts increase along the line plot, due to an increasing projected glass thickness in the direction of the X-ray path, that the photons have to pass. The nylon string causes additional absorption, which results in a reduction of counts in the center of the plot. For an objective quantification of the image quality the contrast to noise ratio (CNR) was calculated. The CNR is defined as: where s 0 is the signal or grey value intensity averaged over 3 × 3 pixel and s B is the average intensity of the background over 10 × 10 pixel with standard deviation σ B . To include a sufficient number of pixels with the same intensity in the CNR calculation, a grey step wedge with increasing thickness levels was used as shown on the right side of Fig. 2. The CNR values for the thickness of the nylon string is written in the legends in Fig. 2 for the respective data. Although the CNR for 42 kV looks best in the line plots, the calculated value is lower than for 39 kV. This may stem from a higher standard deviation (photon noise) at 42 kV, most probably from the voltage and current regulator electronics. Note that the X-ray tube is the most important source of noise, as individual X-ray photons are emitted. However, for proper detection a CNR greater than 2 is needed (Esposito et al., 2014), while CNR values are below 0.9. This implies difficulties for the detection of nylon particulates.
The exposure time is directly related to the number of photons passing through the sample and, therefore, to the intensity of signal in the detector or the grey values in the images. After a longer exposure time, the random noise decreases, but it is limited by the maximum count of the pixel. To that end, the information of single images was averaged in order to increase the CNR and avoid overexposure at the same time. Fig. 3 shows the results of a single image and the averaging process for 2, 4, 8, 16, 40, 80 and 120 images at an exposure time of 125 ms each for a lyo stopper impurity at the vial bottom. The procedure does not have a significant effect on the reduction of noise. In Fig. 4 averaging results are summarized for various exposure times of single images and number of frames. At exposure times of 125 ms and 250 ms, the CNR increases for a lower number of frames, while the effect is negligible for 40 frames and more. A potential reason is additional noise produced by the detector's electronics. After the longest exposure time of 500 ms, the CNR remains stable for all frame numbers. Considering that the total acquisition time should be as short as possible, an exposure time of 250 ms with an averaging of 16 images was selected for further investigations. Hence, the time period for one vial detection was 4 s.
The magnification specifies the image size on the detector and therefore, the number of pixels per impurity. It is defined as the ratio between the distance from the tube to the detector and the distance from the tube to the object. A minimum magnification of 2 is required to record a particulate on a sufficient number of pixels in order to exclude false detections due to single bad pixels. As in the other experiments the distance between the tube outlet and the detector was fixed at 300 mm, while the distance between the tube outlet and the vial was varied between 88 mm and 134 mm. No significant influence of the magnification level was observed. Since greater distances can cause a blur due to an enhanced effect of photon scattering on the image, a magnification of 2.5 was selected. It has to be considered, that for bigger vials a greater distance between the X-ray source and the vial is needed in case the image does not fit on the detector. Consequently, the resolution will decrease. Additionally, the thicker glass of the vials will affect the image quality due to increased absorption and scattering and a lower CNR.
To detect specific impurity classes, the vials were tilted at 30 • or 45 • angle to enable a proper view of the bottom regions. Fig. 5 shows examples of X-ray images of vials with various particulates. The images are presented in a false colour palette. During this procedure, certain ranges of the raw pixel value were linked with a specified colour in a linear way. The minimum and maximum values are coloured black and white, respectively. Therefore, the vials are darker at the edges due to increasing projected glass thickness. In addition, a Fast Fourier Transformation (FFT) bandpass filter was applied to enhance the visualization of frequencies within the expected impurity size range. High frequencies of single pixel noise and low frequencies of structures beyond 20 pixels in size are dampened. Large impurities in this range were also removed. Fig. 5 shows that generally all types of spiked particulate matter in the vials were detected. The particulate matter is highlighted with false colours. The nylon string is additionally marked between black lines, while black arrows indicate some of the other particulates. Any particulates expanding over a series of neighbouring pixels, such as nylon strings and hair, are more obvious than similarly sized particulates of other low-density materials.
To visualize impurities with low molecular weight (e.g., polymers and hair), a certain level of contrast enhancement is required, which makes any structure of lyophilized product more pronounced. Fig. 6 shows a false coloured X-ray image of a vial containing a human hair processed with a bandpass filter. Besides the hair, which is marked between two lines and ranges over the full image width, several other features are apparent. The most prominent ones are the internal cake structure and the ring on top of the cake. The latter is caused by the protein solution that sticks to the vial wall during freeze-drying while the cake is shrinking. The internal structure is related to a porous system with regions of higher or lower density in the cake and is visualized as  brighter or darker areas. Cracks and voids in the lyophilized cake appear as brighter areas caused by lower density. In addition to the cake patterns, some image artefacts stem from the vial and the detector. Bad pixels look like distinct bright points. The variable glass thickness leads to dark areas, especially on the edges between the vial bottom and the cylindrical wall.
An analysis of grey values showed that for the polymers, the hair and the spider's leg the number of counts that differ from the background is within the same range as for the cake features. The CNR of the latter is higher than that of the particulates. This means, that particulates of these material classes with a small aspect ratio will be hardly detectable. While detecting the investigated types of particulates is feasible, false detections due to the cake or vial inhomogeneities are likely. Table 1 summarizes the detectability of all investigated particulates and indicates, if the cake structure causes a higher signal intensity than the impurity does. The general detectability was rated visually supported by line plot evaluation for single particulates. Agglomerates, which are a main destabilization mechanism of lyophilized products, could in principal be detected due to the fact, that cake structure consisting of the same material with different density is visible in the images. However, discrimination from cake structure and other inhomogeneities is hardly possible.
For reference vials were analysed via μCT with a tube voltage of 50 kV and 0.4 degree angular steps, resulting in 483 frames. The volume reconstruction from these frames led to cross-sectional images with a resolution of 13.5 μm per voxel. The vial glass and noise were eliminated and videos were produced. A vial with stopper particulates in the size class of 80-100 μm is presented in Fig. 7. The left side shows a screenshot of the μCT video and the right side presents an X-ray image. The μCT image reveals a Christmas-tree-like structure with a central trunk and branches extending in the radial direction. The density of the structure is high in the center and decreases in the branches in direction to the cake walls. Some dots are also visible on top of the cake. Exactly the same Christmas-tree structure appears in the X-ray images as depicted on the right side of Fig. 7, which shows the same vial as the μCT image. Filtering of the μCT data for high density regions resulted in the same positions of trunk and branches as in the X-ray image. Fig. 8 shows a vial with stopper particulates in a size class of 250-400 μm in a μCT screenshot (left) and an X-ray image (right). Once again the tree-like structure is evident. Moreover, the stopper particulates are clearly visible on top of the lyo cake in both images. It can be concluded, that while features even in the size below 100 μm can be detected by means of X-ray imaging, differentiating between the impurities in the lower size range and the internal cake structure based on data from both techniques is challenging. Convolutional neural networks (CNN) could be an option for automatized impurity recognition and for reducing the requested number of training sets (Tsay and Li, 2019).
An additional aspect in further development and utilization of automated X-ray imaging is the analysis of the cake structure. Protein stability and quality are affected by heterogeneous structural and material distribution properties (Tejedor et al., 2020). While a relationship exists between the pore size and pore network and the reconstitution time (Beech et al., 2015), more work is necessary to better understand this aspect. In addition to visual inspection various imaging techniques have been used to determine macroscopic and microscopic cake structure and to detect collapses and defects (Haeuser et al., 2018). Especially, μCT yielded good results. All these technologies request high effort and time and are therefore not suitable as in-process tools. As indicated in Figs. 7 and 8 the detection of porosity and interconnected pores is feasible by means of X-ray imaging. Further studies that will help to gain an understanding of the influence of process parameters and the related cake structure on the cake quality attributes such as reconstitution time will be based on this fast technology.
An important aspect of inspection of proteins is the effect of radiation on the drug substance. At a tube voltage of 39 kV and a current of 900 μA, the effective dose rate inside a vial at a distance of 115 mm from the tube outlet was determined to be 2.1 mGy per second. During a total exposure time of 4 s the dose was 8.4 mGy. In a study with two model proteins irradiation doses of up to 25 Gy did not cause significant changes in the activity and structure of proteins (Schaden et al., 2018). However, the dose level must be considered in pharmaceutical applications on the commercial scale. An additional point to be considered for industrial application of X-ray inspection is the representation of the probe between X-ray source and detector. If imaging is performed from a single angle, it may result in a flattened image and loss of the depth dimension. Especially, if an elongated impurity is aligned with the angle of inspection, the detected signal could be minimized. Therefore, either rotation of the sample or several pairs of X-ray source and detector will be needed. While rotation of the sample requests more effort in stable movement and positioning of the vial and leads to an increased measurement time, additional sources and detectors increase equipment size, costs and dose level.

Conclusions
Vials with lyophilized product were inspected for intentionally spiked impurities in an optimized X-ray set-up. The best settings for

Table 1
Detection performance of different impurity classes for inspection parameters: tube voltage 39 kV, current 900 mA, magnification 2.5, total exposure time 4 s. ✓: detection feasible, ✘: no detection, †: higher signal intensity of cake structure than that of particulate. voltage, exposure time and magnification were identified and image processing was applied to enhance the contrast of particulate matter.
While steel and glass could be detected down to sizes of 80-100 μm, which resembles the detection limit of conventional visual inspection, stoppers and other polymers were identified only in bigger size classes.
Organic particulates with diameters of 80-100 μm, but expanding in one dimension such as hair, spider leg or nylon strings could also be detected due to a high number of linked pixels involved. Within the applied exposure time, 900 vials per hour can be inspected in a single line. Dose measurements showed that the effective rate inside a vial is not in an order to affect the pharmaceutical proteins. One remaining challenge is the low contrast for all organic substances and small glass particles whose CNR is within the same range as the surrounding cake structure. Therefore, the next step should be the development of sophisticated algorithms enabling automated impurity detection even for organic matter with small size classes based on machine learning methods. However, it was clearly shown that X-ray imaging opens up a fast and accurate opportunity for the analysis of cake structure itself, making it possible to investigate the relationship between the cake attributes and the CQAs such as reconstitution time of a drug product.

Declaration of Competing Interest
All authors declare the following interests: SWM and MD are permanent employees of the Baxter AG (part of Takeda) and also have an equity interest in Takeda.