Skip to content

Commit 0eea976

Browse files
committed
Add Raysid, KromekGR1, and KromekD5 to DetectorType's detected.
1 parent 5ff7ec4 commit 0eea976

File tree

5 files changed

+56
-8
lines changed

5 files changed

+56
-8
lines changed

SpecUtils/SpecFile.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ enum class DetectorType : int
343343
MicroRaider,
344344
/** Scan-Electronics RadiaCode-10x detector with CsI(Tl) scintillator */
345345
RadiaCode,
346+
347+
/** Raysid 5cm³ CsI/Tl detector */
348+
Raysid,
349+
346350
Interceptor,
347351
RadHunterNaI,
348352
RadHunterLaBr3,
@@ -375,7 +379,13 @@ enum class DetectorType : int
375379

376380
/** The Kromek D3 and D3S detector with Csl(TI) crystal volume of 1 cubic inch */
377381
KromekD3S,
378-
382+
383+
/** The Kromek D5 detector with 1.5x1.5 CLLBC detector */
384+
KromekD5,
385+
386+
/** The Kromek GR1 detector with 1cm3 CZT detector */
387+
KromekGR1,
388+
379389
/** PHDS Fulcrum; HPGe 12% efficient (rel. to 3x3 NaI) handheld detector. */
380390
Fulcrum,
381391

@@ -385,7 +395,7 @@ enum class DetectorType : int
385395
/** BNC SAM-950 detector. There are 1.5x1.5, 2x2, 3x3 NaI variants, as well as LaBr3 2x2, and CeBr3 2x2, but
386396
these are not currently differentiated because I havent seen example files of them.
387397
388-
Also not: The BNC SAMpack may erroneously claim to be a SAM-950 detector, so will get this DetectorType ID applied.
398+
Also note: The BNC SAMpack may erroneously claim to be a SAM-950 detector, so will get this DetectorType ID applied.
389399
*/
390400
Sam950,
391401

bindings/python/SpecFile_py.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,9 @@ py::enum_<SpecUtils::DetectorType>(m, "DetectorType")
14011401
.value("Fulcrum", SpecUtils::DetectorType::Fulcrum)
14021402
.value("Fulcrum40h", SpecUtils::DetectorType::Fulcrum40h)
14031403
.value("Sam950", SpecUtils::DetectorType::Sam950)
1404+
.value("Raysid", SpecUtils::DetectorType::Raysid)
1405+
.value("KromekGR1", SpecUtils::DetectorType::KromekGR1)
1406+
.value("KromekD5", SpecUtils::DetectorType::KromekD5)
14041407
.value("Unknown", SpecUtils::DetectorType::Unknown);
14051408

14061409

src/SpecFile.cpp

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,9 @@ const std::string &detectorTypeToString( const DetectorType type )
14221422
static const string sm_VerifinderNaI = "Verifinder-NaI";
14231423
static const string sm_VerifinderLaBr = "Verifinder-LaBr";
14241424
static const string sm_KromekD3S = "Kromek D3S";
1425+
static const string sm_KromekGR1 = "Kromek GR1";
1426+
static const string sm_KromekD5 = "Kromek D5";
1427+
static const string sm_Raysid = "Raysid";
14251428
static const string sm_Fulcrum = "Fulcrum";
14261429
static const string sm_Fulcrum40h = "Fulcrum-40h";
14271430
static const string sm_Sam950 = "Sam-950";
@@ -1519,6 +1522,12 @@ const std::string &detectorTypeToString( const DetectorType type )
15191522
return sm_VerifinderLaBr;
15201523
case DetectorType::KromekD3S:
15211524
return sm_KromekD3S;
1525+
case DetectorType::KromekD5:
1526+
return sm_KromekD5;
1527+
case DetectorType::KromekGR1:
1528+
return sm_KromekGR1;
1529+
case DetectorType::Raysid:
1530+
return sm_Raysid;
15221531
case DetectorType::Fulcrum:
15231532
return sm_Fulcrum;
15241533
case DetectorType::Fulcrum40h:
@@ -6546,21 +6555,39 @@ void SpecFile::set_detector_type_from_other_info()
65466555
}//if( iequals_ascii( manufacturer_,"ORTEC" ) )
65476556

65486557

6549-
if( icontains( manufacturer_,"Kromek" ) )
6558+
if( icontains(manufacturer_, "Kromek") || icontains(model, "Kromek") )
65506559
{
65516560
// I've seen manufacturer name be either "Kromek" or "Kromek Ltd"
65526561

6553-
if( istarts_with(instrument_model_,"D3") || iequals_ascii(instrument_model_,"D3S") )
6562+
if( icontains(model,"D3") || icontains(model,"D3S") )
65546563
{
65556564
//Have seen model strings: "D3", "D3S", "D3S 2.02"
65566565
detector_type_ = DetectorType::KromekD3S;
65576566
return;
65586567
}
6559-
6568+
6569+
if( icontains(model,"D5") )
6570+
{
6571+
detector_type_ = DetectorType::KromekD5;
6572+
return;
6573+
}
6574+
6575+
if( icontains(model,"GR1") )
6576+
{
6577+
detector_type_ = DetectorType::KromekGR1;
6578+
return;
6579+
}
6580+
65606581
//Other Kromek instrument models I've seem: "MultiSpect/KSpect"
65616582
}//if( icontains( manufacturer_,"Kromek" ) )
6562-
6563-
6583+
6584+
6585+
if( icontains(instrument_model_,"Raysid") )
6586+
{
6587+
detector_type_ = DetectorType::Raysid;
6588+
return;
6589+
}
6590+
65646591
if( iequals_ascii(instrument_type_,"PVT Portal") && iequals_ascii(manufacturer_,"SAIC") )
65656592
{
65666593
detector_type_ = DetectorType::SAIC8;

src/SpecFile_n42.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,19 @@ std::string determine_gamma_detector_kind_code( const SpecUtils::SpecFile &sf )
575575

576576
case SpecUtils::DetectorType::MicroRaider:
577577
case SpecUtils::DetectorType::Interceptor:
578+
case SpecUtils::DetectorType::KromekGR1:
578579
det_kind = "CZT";
579580
break;
580581

581582
case SpecUtils::DetectorType::KromekD3S:
582583
case SpecUtils::DetectorType::RadiaCode:
584+
case SpecUtils::DetectorType::Raysid:
583585
det_kind = "CsI";
584586
break;
585-
587+
588+
case SpecUtils::DetectorType::KromekD5:
589+
det_kind = "CLLBC";
590+
586591
case SpecUtils::DetectorType::Unknown:
587592
{
588593
const string &manufacturer = sf.manufacturer();

src/SpecFile_spc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,9 @@ bool SpecFile::write_binary_spc( std::ostream &output,
13851385
case DetectorType::VerifinderNaI:
13861386
case DetectorType::VerifinderLaBr:
13871387
case DetectorType::KromekD3S:
1388+
case DetectorType::Raysid:
1389+
case DetectorType::KromekGR1:
1390+
case DetectorType::KromekD5:
13881391
case DetectorType::RadiaCode:
13891392
case DetectorType::Fulcrum:
13901393
case DetectorType::Fulcrum40h:

0 commit comments

Comments
 (0)