# Backscattering Experimental Data Python interface of experimental data for measurements of backscattered light in the Virgo interferometer. It can be executed on Cascina server to load online data, or use local [hdf5](https://www.hdfgroup.org/solutions/hdf5/) file. ## Getting started This project use [uv](https://docs.astral.sh/uv/) to manage dependencies, and [mise](https://mise.jdx.dev/) to manage python version and virtual environment. > [!NOTE] > You can still use pip to manage dependencies using [pyproject.toml](pyproject.toml) ## Example ```py from backscattering_experimental_data.factory.initializer import ( InitializerComponent, InitializerScatterer, ) from backscattering_experimental_data.factory.measurement import MeasurementFactory from backscattering_experimental_data.root import Root from backscattering_experimental_data.metadata import MetadataRoot, InjectionFactory from gwpy.time import Time from astropy.units import s, V, m, min, Hz, dimensionless_unscaled from h5py import File SR = InitializerComponent( name = "SR", calibration_factor = 1.15*m/V, ) NE = InitializerComponent( name = "NE", calibration_factor = 0.97*m/V, ) REF_LOW_NOISE_2 = MeasurementFactory.fetch( "Low Noise 2 - reference", "Reference data taken before the injection, in Low Noise 2", Time("2025-06-17T18:11:00.000000000", format="isot", scale="utc"), 4 * min, [ InitializerScatterer( name = "SDB1", calibration_factor = 1.15 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SDB2", calibration_factor = 1.3 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SWEB", calibration_factor = 0.97 * m / V, associated_component = NE, injection = None, ), ], True, ) SDB1_LOW_NOISE_2 = MeasurementFactory.fetch( "Low Noise 2 - SDB1", "Injection of sine line in SDB1's suspension stage F0 in Low Noise 2 (SR is aligned)", Time("2025-06-17T18:23:00.000000000", format="isot", scale="utc"), 4 * min, [ InitializerScatterer( name="SDB1", calibration_factor=1.15*m/V, associated_component=SR, injection=InjectionFactory.make( type_="sin", amplitude=0.7 * dimensionless_unscaled, frequency=0.1 * Hz, ), ), InitializerScatterer( name="SDB2", calibration_factor=1.3*m/V, associated_component=SR, injection=None, ), ], True, ) SWEB_LOW_NOISE_2 = MeasurementFactory.fetch( "Low Noise 2 - SWEB", "Injection of sine line on SWEB's SBE top stage in Low Noise 2 (SR is aligned)", Time("2025-06-17T18:53:00.000000000", format="isot", scale="utc"), 15 * min, [ InitializerScatterer( name = "SWEB", calibration_factor=0.97*m/V, associated_component=NE, injection=InjectionFactory.make( type_ = "sin", amplitude = 150 * dimensionless_unscaled, frequency = 0.2 * Hz, ) ), ], True, ) REF_LOW_NOISE_3_1 = MeasurementFactory.fetch( "Low Noise 3 - reference 1", "Reference data taken after going in Low Noise 3", Time("2025-06-17T19:21:00.000000000", format="isot", scale="utc"), 5 * min, [ InitializerScatterer( name = "SDB1", calibration_factor = 1.15 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SDB2", calibration_factor = 1.3 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SWEB", calibration_factor = 0.97 * m / V, associated_component = NE, injection = None, ), ], True, ) SDB1_LOW_NOISE_3 = MeasurementFactory.fetch( "Low Noise 3 - SDB1", "Injection of sine line in SDB1's suspension stage F0 in Low Noise 3, so with SR misaligned", Time("2025-06-17T19:33:00.000000000", format="isot", scale="utc"), 4 * min, [ InitializerScatterer( name = "SDB1", calibration_factor = 1.15 * m / V, associated_component = SR, injection = InjectionFactory.make( type_ = "sin", amplitude = 0.7 * dimensionless_unscaled, frequency = 0.1 * Hz, ), ), InitializerScatterer( name="SDB2", calibration_factor=1.3*m/V, associated_component=SR, injection=None, ), ], True, ) SWEB_LOW_NOISE_3 = MeasurementFactory.fetch( "Low Noise 3 - SWEB", "Injection of sine line on SWEB's top stage suspension in Low Noise 3 (SR misaligned)", Time("2025-06-17T19:51:29.000000000", format="isot", scale="utc"), 5 * min + 31 * s, [ InitializerScatterer( name = "SWEB", calibration_factor = 0.97 * m/V, associated_component = NE, injection = InjectionFactory.make( type_ = "sin", amplitude = 100 * dimensionless_unscaled, frequency = 0.2 * Hz, ), ), ], True, ) REF_LOW_NOISE_3_2 = MeasurementFactory.fetch( "Low Noise 3 - reference 2", "Reference data taken after the SDB1 measurement in Low Noise 3", Time("2025-06-17T19:45:00.000000000", format="isot", scale="utc"), 4 * min, [ InitializerScatterer( name = "SDB1", calibration_factor = 1.15 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SDB2", calibration_factor = 1.3 * m / V, associated_component = SR, injection = None, ), InitializerScatterer( name = "SWEB", calibration_factor = 0.97 * m / V, associated_component = NE, injection = None, ), ], True, ) SDB2_LOW_NOISE_3 = MeasurementFactory.fetch( "Low Noise 3 - SDB2", "Injection of sine line on SDB2's top stage suspension to check if everything is working (still in Low Noise 3, so with SR misaligned)", Time("2025-06-17T20:07:38.000000000", format="isot", scale="utc"), 7 * min + 12 * s, [ InitializerScatterer( name = "SDB2", calibration_factor = 1.3 * m/V, associated_component = SR, injection = InjectionFactory.make( type_ = "sin", amplitude = 75 * dimensionless_unscaled, frequency = 0.1 * Hz, ), ) ], True, ) root = Root( metadata=MetadataRoot( name="Low Noise 2 & Low Noise 3 injections", description="These measurements were done in 2025-06-17 to check the difference of SDB1 fsc for SR misaligned and SR aligned. In Low Noise 2, SR is aligned, and in Low Noise 3, SR is misaligned. All the measurements are described in this logbook entry: https://logbook.virgo-gw.eu/virgo/?r=67027.", ), measurements=[ REF_LOW_NOISE_2, SDB1_LOW_NOISE_2, SWEB_LOW_NOISE_2, REF_LOW_NOISE_3_1, SDB1_LOW_NOISE_3, REF_LOW_NOISE_3_2, SWEB_LOW_NOISE_3, SDB2_LOW_NOISE_3, ], ) with File("mesure-juin-2025.hdf5", "w") as store: root = root.to_hdf5(store) ``` ## License This project is licensed under the GNU GPL v3+. See [license file](LICENSE) for more information. ## Acknowledgment Thanks to all the people that worked on [GWpy](https://gwpy.github.io) and on all software and library used in this project.