pymchelper.readers package#
Subpackages#
- pymchelper.readers.shieldhit package
- Submodules
- pymchelper.readers.shieldhit.binary_spec module
SHBDOTagIDSHBDOTagID.apro0SHBDOTagID.apzlsclSHBDOTagID.beamdivkSHBDOTagID.beamdivxSHBDOTagID.beamdivySHBDOTagID.beamphiSHBDOTagID.beamthetaSHBDOTagID.beamxSHBDOTagID.beamySHBDOTagID.beamzSHBDOTagID.commentSHBDOTagID.ct_angSHBDOTagID.ct_icntSHBDOTagID.ct_lenSHBDOTagID.data_blockSHBDOTagID.debugSHBDOTagID.deleSHBDOTagID.deminSHBDOTagID.det_dif_startSHBDOTagID.det_dif_stopSHBDOTagID.det_difftypeSHBDOTagID.det_dmatSHBDOTagID.det_dsizeSHBDOTagID.det_dsizexyzSHBDOTagID.det_dtypeSHBDOTagID.det_geotypSHBDOTagID.det_nbinSHBDOTagID.det_nbineSHBDOTagID.det_partSHBDOTagID.det_partaSHBDOTagID.det_partzSHBDOTagID.det_threshSHBDOTagID.det_voxvolSHBDOTagID.det_xyz_startSHBDOTagID.det_xyz_stopSHBDOTagID.det_zonestartSHBDOTagID.detector_typeSHBDOTagID.detector_unitSHBDOTagID.errorSHBDOTagID.estimator_numberSHBDOTagID.estimator_rescale_per_particleSHBDOTagID.ext_nprojSHBDOTagID.ext_ptvdoseSHBDOTagID.filedateSHBDOTagID.filename_or_geotypeSHBDOTagID.formatSHBDOTagID.geo_n_binsSHBDOTagID.geo_non_equidist_gridSHBDOTagID.geo_p_startSHBDOTagID.geo_q_stopSHBDOTagID.geo_rotationSHBDOTagID.geo_unit_idsSHBDOTagID.geo_unitsSHBDOTagID.geo_volumeSHBDOTagID.geo_zonesSHBDOTagID.geometry_nameSHBDOTagID.geometry_typeSHBDOTagID.hostSHBDOTagID.iemtransSHBDOTagID.iextspecSHBDOTagID.intrfastSHBDOTagID.intrslowSHBDOTagID.inucreSHBDOTagID.ioffsetSHBDOTagID.irifimcSHBDOTagID.irifitransSHBDOTagID.irifizoneSHBDOTagID.itypmsSHBDOTagID.itypstSHBDOTagID.ixfirsSHBDOTagID.jpart0SHBDOTagID.number_of_pagesSHBDOTagID.olnSHBDOTagID.page_diff_flagSHBDOTagID.page_diff_sizeSHBDOTagID.page_diff_startSHBDOTagID.page_diff_stopSHBDOTagID.page_diff_typeSHBDOTagID.page_diff_unitsSHBDOTagID.page_filter_e_minSHBDOTagID.page_filter_emaxSHBDOTagID.page_filter_nameSHBDOTagID.page_filter_rules_noSHBDOTagID.page_medium_scoringSHBDOTagID.page_medium_transportSHBDOTagID.page_normalizedSHBDOTagID.page_numberSHBDOTagID.page_offsetSHBDOTagID.page_scale_factorSHBDOTagID.page_unit_idsSHBDOTagID.phase_space_populationSHBDOTagID.rt_nstatSHBDOTagID.rt_timeSHBDOTagID.rt_timesimSHBDOTagID.shbuilddateSHBDOTagID.shversionSHBDOTagID.sigmat0SHBDOTagID.sigmaxSHBDOTagID.sigmaySHBDOTagID.tmax0SHBDOTagID.tmax0amuSHBDOTagID.tmax0mevSHBDOTagID.tmax0nucSHBDOTagID.userSHBDOTagID.zpro0
SHBDOUnitIDSHBDOUnitID.SH_SCORING_UNIT_AUSHBDOUnitID.SH_SCORING_UNIT_CMSHBDOUnitID.SH_SCORING_UNIT_CM2SHBDOUnitID.SH_SCORING_UNIT_CM3SHBDOUnitID.SH_SCORING_UNIT_COUNTSHBDOUnitID.SH_SCORING_UNIT_DEGREESSHBDOUnitID.SH_SCORING_UNIT_DOSERADSHBDOUnitID.SH_SCORING_UNIT_DOSEREMSHBDOUnitID.SH_SCORING_UNIT_GPCM3SHBDOUnitID.SH_SCORING_UNIT_GYSHBDOUnitID.SH_SCORING_UNIT_GYRBESHBDOUnitID.SH_SCORING_UNIT_GYRESHBDOUnitID.SH_SCORING_UNIT_INVALIDSHBDOUnitID.SH_SCORING_UNIT_KEVPUMSHBDOUnitID.SH_SCORING_UNIT_KGPM3SHBDOUnitID.SH_SCORING_UNIT_MSHBDOUnitID.SH_SCORING_UNIT_M2SHBDOUnitID.SH_SCORING_UNIT_M3SHBDOUnitID.SH_SCORING_UNIT_MATIDSHBDOUnitID.SH_SCORING_UNIT_MEVSHBDOUnitID.SH_SCORING_UNIT_MEVCM2PGSHBDOUnitID.SH_SCORING_UNIT_MEVPAMUSHBDOUnitID.SH_SCORING_UNIT_MEVPC2SHBDOUnitID.SH_SCORING_UNIT_MEVPCMSHBDOUnitID.SH_SCORING_UNIT_MEVPGSHBDOUnitID.SH_SCORING_UNIT_MEVPNUCSHBDOUnitID.SH_SCORING_UNIT_NONESHBDOUnitID.SH_SCORING_UNIT_NUCNSHBDOUnitID.SH_SCORING_UNIT_NZONESHBDOUnitID.SH_SCORING_UNIT_PCMSHBDOUnitID.SH_SCORING_UNIT_PCM2SHBDOUnitID.SH_SCORING_UNIT_PCM3SHBDOUnitID.SH_SCORING_UNIT_PCTSHBDOUnitID.SH_SCORING_UNIT_PMSHBDOUnitID.SH_SCORING_UNIT_PM2SHBDOUnitID.SH_SCORING_UNIT_PM3SHBDOUnitID.SH_SCORING_UNIT_PMILSHBDOUnitID.SH_SCORING_UNIT_RADIANSSHBDOUnitID.SH_SCORING_UNIT_RELATIVESHBDOUnitID.SH_SCORING_UNIT_SRSHBDOUnitID.SH_SCORING_UNIT_SVSHBDOUnitID.SH_SCORING_UNIT_USHBDOUnitID.SH_SCORING_UNIT_UNKNOWN
- pymchelper.readers.shieldhit.general module
- pymchelper.readers.shieldhit.reader_base module
- pymchelper.readers.shieldhit.reader_bdo2016 module
- pymchelper.readers.shieldhit.reader_bdo2019 module
- pymchelper.readers.shieldhit.reader_bin2010 module
- Module contents
Submodules#
pymchelper.readers.common module#
pymchelper.readers.fluka module#
- class pymchelper.readers.fluka.AxesDescription(x: AxisDescription, y: AxisDescription, z: AxisDescription)[source]#
Bases:
objectAxes descriptions
- x: AxisDescription#
- y: AxisDescription#
- z: AxisDescription#
- class pymchelper.readers.fluka.FlukaReader(filename)[source]#
Bases:
Reader- property corename#
corename_fort.XX. :return: corename part of output file or None in case filename doesn’t follow Fluka naming pattern
- Type:
Fluka output filenames follow this pattern
- parse_data(estimator)[source]#
TODO :param estimator: an Estimator object, will be modified here and filled with data
- parse_resnuclei(estimator)[source]#
TODO add support for resnuclei RESNUCLEi Scores residual nuclei produced in inelastic interactions on a region basis :param estimator: an Estimator object, will be modified here and filled with data
- parse_usrbdx(estimator)[source]#
USRBDX defines a detector for a boundary crossing fluence or current estimator.
- Parameters:
estimator – an Estimator object, will be modified here and filled with data
- parse_usrbin(estimator)[source]#
USRBIN scores distribution of one of several quantities in a regular spatial structure (binning detector) independent from the geometry. :param estimator: an Estimator object, will be modified here and filled with data
- class pymchelper.readers.fluka.FlukaReaderFactory(filename)[source]#
Bases:
ReaderFactoryClass responsible for discovery of filetype.
- class pymchelper.readers.fluka.UsrbinScoring[source]#
Bases:
objectHelper class for USRBIN scoring
- static get_axes_description(binning_type: int) AxesDescription[source]#
Get axes descriptions for binning type
- classmethod get_unit_and_factor_for_scoring(scoring: str) -> (<class 'str'>, <class 'float'>)[source]#
Get unit and rescaling factor for scoring
Based on: - (1) https://flukafiles.web.cern.ch/manual/chapters/particle_and_material_codes/particles_codes.html - (2) https://flukafiles.web.cern.ch/manual/chapters/description_input/description_options/usrbin.html
- Parameters:
scoring – scoring name
- Returns:
tuple of scoring and unit
pymchelper.readers.topas module#
- class pymchelper.readers.topas.TopasReader(filename)[source]#
Bases:
ReaderReader for Topas output files
- property corename: str#
- read_data(estimator: Estimator) bool[source]#
Read the data from the file and store them in the provided estimator object. TOPAS reader assumes that the input file is in the same directory as the output file to extract the number of histories from it. If the name of the input file is not found in the output file or the input file is not in the same directory, the number of histories is set to 0.
- class pymchelper.readers.topas.TopasReaderFactory(filename)[source]#
Bases:
ReaderFactoryFactory for TopasReader
- pymchelper.readers.topas.extract_bins_data(dimensions: List[str], header_lines: List[str]) dict | None[source]#
Takes as arguments a list of dimensions (e.g. [‘X’, ‘Y’, ‘Z’]) and three consecutive lines from the output file header. Returns dict containing number of bins, bin size and unit for each dimension or None if output file does not contain this information for provided dimensions
- pymchelper.readers.topas.extract_differential_axis(header_line: str) MeshAxis | None[source]#
Check if the output file contains differential axis and get it from file if it does
- pymchelper.readers.topas.extract_parameter_filename(header_line: str) str | None[source]#
Get parameter filename from the output file
- pymchelper.readers.topas.extract_scorer_name(header_line: str) str | None[source]#
Get scorer name from the output file