IMP
2.3.1
The Integrative Modeling Platform
|
#include <IMP/saxs/WeightedProfileFitter.h>
Fitting of multiple profiles to the experimental one. The weights of the profiles are computed analytically using non-negative least squares fitting (NNLS).
Definition at line 27 of file WeightedProfileFitter.h.
Public Member Functions | |
WeightedProfileFitter (const Profile *exp_profile) | |
Constructor. More... | |
Float | compute_score (const ProfilesTemp &profiles, std::vector< double > &weights, bool NNLS=true) const |
compute a weighted score that minimizes chi More... | |
WeightedFitParameters | fit_profile (ProfilesTemp partial_profiles, float min_c1=0.95, float max_c1=1.05, float min_c2=-2.0, float max_c2=4.0) const |
fit profiles by optimization of c1/c2 and weights More... | |
void | write_fit_file (ProfilesTemp partial_profiles, const WeightedFitParameters &fp, const std::string fit_file_name) const |
write a fit file More... | |
Public Member Functions inherited from IMP::saxs::ProfileFitter< ChiScore > | |
ProfileFitter (const Profile *exp_profile) | |
Constructor. More... | |
ProfileFitter (const Profile *exp_profile, ChiScore *sf) | |
Float | compute_offset (const Profile *model_profile) const |
computes offset for fitting for fitting the modeled profile More... | |
Float | compute_scale_factor (const Profile *model_profile, Float offset=0.0) const |
computes the scaling factor needed for fitting the modeled profile More... | |
Float | compute_score (const Profile *model_profile, bool use_offset=false, const std::string fit_file_name="") const |
compute fit score More... | |
Float | compute_score (const Profile *model_profile, Float min_q, Float max_q) const |
compute fit score in the interval More... | |
FitParameters | fit_profile (Profile *partial_profile, float min_c1=0.95, float max_c1=1.05, float min_c2=-2.0, float max_c2=4.0, bool use_offset=false, const std::string fit_file_name="") const |
fit experimental profile through optimization of c1 and c2 parameters More... | |
void | resample (const Profile *model_profile, Profile *resampled_profile) const |
resampling of the modeled profile is required to fit the q More... | |
void | write_SAXS_fit_file (const std::string &file_name, const Profile *model_profile, const Float chi_square, const Float c=1, const Float offset=0) const |
Public Member Functions inherited from IMP::base::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
virtual VersionInfo | get_version_info () const |
Get information about the module and version of the object. More... | |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
virtual std::string | get_type_name () const |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::base::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
Protected Attributes inherited from IMP::saxs::ProfileFitter< ChiScore > | |
base::PointerMember< const Profile > | exp_profile_ |
ChiScore * | scoring_function_ |
IMP::saxs::WeightedProfileFitter::WeightedProfileFitter | ( | const Profile * | exp_profile | ) |
Constructor.
[in] | exp_profile | Experimental profile we want to fit |
Float IMP::saxs::WeightedProfileFitter::compute_score | ( | const ProfilesTemp & | profiles, |
std::vector< double > & | weights, | ||
bool | NNLS = true |
||
) | const |
compute a weighted score that minimizes chi
it is assumed that the q values of the profiles are the same as the q values of the experimental profile. Use Profile::resample to resample if(NNLS = true, solve non-negative least squares, otherwise solve just least squares, that may return negative weights to be discarded later
WeightedFitParameters IMP::saxs::WeightedProfileFitter::fit_profile | ( | ProfilesTemp | partial_profiles, |
float | min_c1 = 0.95 , |
||
float | max_c1 = 1.05 , |
||
float | min_c2 = -2.0 , |
||
float | max_c2 = 4.0 |
||
) | const |
fit profiles by optimization of c1/c2 and weights
it is assumed that the q values of the profiles are the same as the q values of the experimental profile. Use Profile::resample to resample
void IMP::saxs::WeightedProfileFitter::write_fit_file | ( | ProfilesTemp | partial_profiles, |
const WeightedFitParameters & | fp, | ||
const std::string | fit_file_name | ||
) | const |
write a fit file