Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
lalsuite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
109
Issues
109
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
28
Merge Requests
28
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
lalsuite
Commits
2afe7f3c
Commit
2afe7f3c
authored
Mar 25, 2018
by
John Douglas Veitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store injection sample in HDF5 file
parent
c9243f16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
lalinference/src/LALInferenceNestedSampler.c
lalinference/src/LALInferenceNestedSampler.c
+8
-0
lalinference/src/LALInferenceReadData.c
lalinference/src/LALInferenceReadData.c
+5
-6
lalinference/src/LALInferenceReadData.h
lalinference/src/LALInferenceReadData.h
+1
-1
No files found.
lalinference/src/LALInferenceNestedSampler.c
View file @
2afe7f3c
...
...
@@ -19,6 +19,7 @@
#include <lal/LALInferencePrior.h>
#include <lal/LALInferenceLikelihood.h>
#include <lal/LALInferenceProposal.h>
#include <lal/LALInferenceReadData.h>
#include <lal/LALInferenceHDF5.h>
#include <lal/LALInferencePriorVolumes.h>
...
...
@@ -1175,6 +1176,13 @@ void LALInferenceNestedSamplingAlgorithm(LALInferenceRunState *runState)
XLALH5FileAddScalarAttribute
(
groupPtr
,
"number_live_points"
,
&
Nlive
,
LAL_U4_TYPE_CODE
);
XLALH5FileAddScalarAttribute
(
groupPtr
,
"log_prior_volume"
,
&
logvolume
,
LAL_D_TYPE_CODE
);
LALInferenceVariables
*
injParams
=
NULL
;
if
(
(
injParams
=
LALInferencePrintInjectionSample
(
runState
))
)
{
LALInferenceH5VariablesArrayToDataset
(
groupPtr
,
&
injParams
,
1
,
"injection_params"
);
LALInferenceClearVariables
(
injParams
);
XLALFree
(
injParams
);
}
XLALH5FileClose
(
h5file
);
}
...
...
lalinference/src/LALInferenceReadData.c
View file @
2afe7f3c
...
...
@@ -2094,7 +2094,7 @@ void LALInferenceInjectionToVariables(SimInspiralTable *theEventTable, LALInfere
}
void
LALInferencePrintInjectionSample
(
LALInferenceRunState
*
runState
)
{
LALInferenceVariables
*
LALInferencePrintInjectionSample
(
LALInferenceRunState
*
runState
)
{
int
errnum
=
0
;
char
*
fname
=
NULL
;
char
defaultname
[]
=
"injection_params.dat"
;
...
...
@@ -2113,7 +2113,7 @@ void LALInferencePrintInjectionSample(LALInferenceRunState *runState) {
ProcessParamsTable
*
ppt
=
LALInferenceGetProcParamVal
(
runState
->
commandLine
,
"--inj"
);
if
(
!
ppt
)
return
;
return
(
NULL
)
;
SimInspiralTableFromLIGOLw
(
&
injTable
,
ppt
->
value
,
0
,
0
);
...
...
@@ -2144,7 +2144,7 @@ void LALInferencePrintInjectionSample(LALInferenceRunState *runState) {
if
(
!
(
approx
&&
order
)){
fprintf
(
stdout
,
"Unable to print injection sample: No approximant/PN order set
\n
"
);
return
;
return
(
NULL
)
;
}
/* Fill named variables */
LALInferenceInjectionToVariables
(
theEventTable
,
injparams
);
...
...
@@ -2180,9 +2180,8 @@ void LALInferencePrintInjectionSample(LALInferenceRunState *runState) {
LALInferencePrintSample
(
outfile
,
injparams
);
fclose
(
outfile
);
LALInferenceClearVariables
(
injparams
);
XLALFree
(
injparams
);
return
;
//LALInferenceClearVariables(injparams);
return
(
injparams
);
}
void
enforce_m1_larger_m2
(
SimInspiralTable
*
injEvent
){
...
...
lalinference/src/LALInferenceReadData.h
View file @
2afe7f3c
...
...
@@ -66,7 +66,7 @@ void LALInferenceInjectionToVariables(SimInspiralTable *theEventTable, LALInfere
* \brief Function to output a sample with logL values etc for the injection, if one is made.
* Requires --inj, --outfile and optionally --event (if not 0).
*/
void
LALInferencePrintInjectionSample
(
LALInferenceRunState
*
runState
);
LALInferenceVariables
*
LALInferencePrintInjectionSample
(
LALInferenceRunState
*
runState
);
void
LALInferenceInjectFromMDC
(
ProcessParamsTable
*
commandLine
,
LALInferenceIFOData
*
IFOdata
);
/*@}*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment