[med-svn] [aghermann] 60/85: whitespace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 3d863fc8567f496b50844231bf71e841f2b342ef Author: Andrei Zavada Date: Sat Sep 21 02:34:25 2013 +0300 whitespace --- upstream/src/aghermann/ui/mw/loadsave.cc | 86 +++--- upstream/src/common/lang.hh | 14 ++--- upstream/src/tools/edfhed-gtk.cc | 73 + 3 files changed, 88 insertions(+), 85 deletions(-) diff --git a/upstream/src/aghermann/ui/mw/loadsave.cc b/upstream/src/aghermann/ui/mw/loadsave.cc index f681c02..44e0982 100644 --- a/upstream/src/aghermann/ui/mw/loadsave.cc +++ b/upstream/src/aghermann/ui/mw/loadsave.cc @@ -29,50 +29,50 @@ saving_colors() return move( forward_list> ({ -{"MWNight",SExpDesignUI::TColour::mw_night }, -{"MWDay",SExpDesignUI::TColour::mw_day }, -{"MWTicks",SExpDesignUI::TColour::mw_ticks }, -{"MWLabels",SExpDesignUI::TColour::mw_labels }, -{"MWProfile", SExpDesignUI::TColour::mw_profile }, - -{"ScoreNONE",SExpDesignUI::TColour::score_none }, -{"ScorNeREM1", SExpDesignUI::TColour::score_nrem1 }, -{"ScoreNREM2", SExpDesignUI::TColour::score_nrem2 }, -{"ScoreNREM3", SExpDesignUI::TColour::score_nrem3 }, -{"ScoreNREM4", SExpDesignUI::TColour::score_nrem4 }, -{"ScoreREM",SExpDesignUI::TColour::score_rem }, -{"ScoreWake",SExpDesignUI::TColour::score_wake }, - -{"SFProfilePSD", SExpDesignUI::TColour::sf_profile_psd}, -{"SFProfileSWU", SExpDesignUI::TColour::sf_profile_swu}, -{"SFProfileMC", SExpDesignUI::TColour::sf_profile_mc }, - -{"SFPhasicSpindle", SExpDesignUI::TColour::sf_phasic_spindle}, -{"SFPhasicKComplex", SExpDesignUI::TColour::sf_phasic_Kcomplex}, -{"SFPhasicEyeBlink", SExpDesignUI::TColour::sf_phasic_eyeblink}, - -{"SFEMG", SExpDesignUI::TColour::sf_emg }, -{"SFHypnogram", SExpDesignUI::TColour::sf_hypnogram }, -{"SFArtifacts", SExpDesignUI::TColour::sf_artifact }, -{"SFAnnotations", SExpDesignUI::TColour::sf_annotations}, +{"MWNight", SExpDesignUI::TColour::mw_night}, +{"MWDay", SExpDesignUI::TColour::mw_day}, +{"MWTicks", SExpDesignUI::TColour::mw_ticks}, +{"MWLabels", SExpDesignUI::TColour::mw_labels}, +{"MWProfile", SExpDesignUI::TColour::mw_profile}, + +{"ScoreNONE", SExpDesignUI::TColour::score_none}, +{"ScorNeREM1", SExpDesignUI::TColour::score_nrem1}, +{"ScoreNREM2", SExpDesignUI::TColour::score_nrem2}, +{"ScoreNREM3", SExpDesignUI::TColour::score_nrem3}, +{"ScoreNREM4", SExpDesignUI::TColour::score_nrem4}, +{"ScoreREM", SExpDesignUI::TColour::score_rem}, +{"ScoreWake", SExpDesignUI::TColour::score_wake}, + +{"SFProfilePSD", SExpDesignUI::TColour::sf_profile_psd}, +{"SFProfileSWU", SExpDesignUI::TColour::sf_profile_swu}, +{"SFProfileMC", SExpDesignUI::TColour::sf_profile_mc}, + +{"SFPhasicSpindle", SExpDesignUI::TColour::sf_phasic_spindle}, +{"SFPhasicKComplex", SExpDesignUI::TColour::sf_phasic_Kcomplex}, +{"SFPhasicEyeBlink", SExpDesignUI::TColour::sf_phasic_eyeblink}, + +{"SFEMG", SExpDesignUI::TColour::sf_emg}, +{"SFHypnogram", SExpDesignUI::TColour::sf_hypnogram}, +{"SFArtifacts", SExpDesignUI::TColour::sf_artifact}, +{"SFAnnotations", SExpDesignUI::TColour::sf_annotations}, {"SFEmbeddedAnnotations", SExpDesignUI::TColour::sf_embedded_annotations}, -{"SFSelection", SExpDesignUI::TColour::sf_selection }, -{"SFTicks", SExpDesignUI::TColour
[med-svn] [aghermann] 53/85: every little debugging helps
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit e493ebcd43f7d01b215e839e6d6a845556401864 Author: Andrei Zavada Date: Fri Sep 20 03:02:45 2013 +0300 every little debugging helps --- upstream/src/aghermann/expdesign/dirlevel.cc | 10 ++ upstream/src/aghermann/expdesign/dirlevel.hh |1 + upstream/src/aghermann/patterns/patterns.cc| 33 upstream/src/aghermann/patterns/patterns.hh|4 +-- .../src/aghermann/ui/dirlevel-storable-adapter.ii |3 +- 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index fd6..86b76a8 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -137,6 +137,16 @@ save() } +string +CStorablePPack:: +serialize() const +{ +return move( +str::sasprintf( +"%s/%s %s (%s/%s/%s)", +subdir.c_str(), name.c_str(), exp_dir_level_s(), level_id.g.c_str(), level_id.j.c_str(), level_id.d.c_str())); +} + // Local Variables: // Mode: c++ diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index 65c575c..f512806 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -90,6 +90,7 @@ class CStorablePPack { virtual int load(); virtual int save(); +virtual string serialize() const; void touch() { saved = false; } diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 8bb6434..380d3d4 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -174,6 +174,39 @@ load() template <> +string +SPattern:: +serialize() const +{ +return CStorablePPack::serialize() + +str::sasprintf( +" ::" +" env_scope: %g;" +" bwf_ffrom: %g;" +" bwf_fupto: %g;" +" bwf_order: %d;" +" dzcdf_step: %g;" +" dzcdf_sigma: %g;" +" dzcdf_smooth: %d;" +" criteria: %g %g %g %g;" +" thing: %zu smpl;", +Pp.env_scope, +Pp.bwf_ffrom, +Pp.bwf_fupto, +Pp.bwf_order, +Pp.dzcdf_step, +Pp.dzcdf_sigma, +Pp.dzcdf_smooth, +get<0>(criteria), +get<1>(criteria), +get<2>(criteria), +get<3>(criteria), +thing.size()); +} + + + +template <> SPattern:: SPattern (const string& name_, TExpDirLevel level_, CExpDesign& ED_, const SExpDirLevelId& level_id_) : CStorablePPack (".patterns", name_, level_, ED_, level_id_), diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index 6407f42..7138f76 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -192,9 +192,9 @@ struct SPattern int load(); int save(); +string serialize() const; -int -delete_file(); +int delete_file(); valarray thing; diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii index 12c1125..23a13fe 100644 --- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii +++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii @@ -143,7 +143,8 @@ set_profile_manage_buttons_visibility() boolhave_active = current_profile != profiles.end(), is_transient = have_active && current_profile->level == agh::TExpDirLevel::transient, is_modified = have_active && not (*current_profile == Pp2); -//printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1); +printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1); +printf( "%s\n-vs-\n%s\n", have_active ? current_profile->serialize().c_str() : "??", Pp2.serialize().c_str()); gtk_widget_set_visible( (GtkWidget*)bXProfileSave, have_active); gtk_widget_set_visible( (GtkWidget*)bXProfileRevert, have_active and not is_transient and is_modified); gtk_widget_set_visible( (GtkWidget*)bXProfi
[med-svn] [aghermann] 02/85: heed or gag most -Wextra and -Wmissing-field-initializers
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 38a5eaa33df715e82b6f6ef85da152b5bde20e76 Author: Andrei Zavada Date: Thu Aug 29 12:55:14 2013 +0300 heed or gag most -Wextra and -Wmissing-field-initializers --- upstream/src/aghermann/model/achermann.hh|6 ++ upstream/src/aghermann/model/ultradian-cycle.cc | 18 +- upstream/src/aghermann/ui/mf/mf.cc |2 +- upstream/src/aghermann/ui/mw/admit-one_cb.cc | 16 upstream/src/aghermann/ui/mw/mainmenu_cb.cc |6 +++--- upstream/src/aghermann/ui/sf/d/phasediff_cb.cc |4 ++-- upstream/src/aghermann/ui/sf/mainmenu_cb.cc | 10 +- upstream/src/aghermann/ui/sf/montage-overlays.cc |2 +- upstream/src/aghermann/ui/sf/montage_cb.cc |2 +- upstream/src/aghermann/ui/ui.cc |2 +- upstream/src/libmetrics/swu.hh |2 +- upstream/src/libsigfile/source-base.cc |2 +- upstream/src/libsigfile/tsv.cc |4 ++-- upstream/src/tools/agh-profile-gen.cc|3 +++ upstream/src/tools/edfhed.cc |3 +++ 15 files changed, 47 insertions(+), 35 deletions(-) diff --git a/upstream/src/aghermann/model/achermann.hh b/upstream/src/aghermann/model/achermann.hh index d92ec17..52cb4dd 100644 --- a/upstream/src/aghermann/model/achermann.hh +++ b/upstream/src/aghermann/model/achermann.hh @@ -73,6 +73,10 @@ class CModelRun : public agh::CProfile { public: +// warning: base class 'class agh::CProfile' should be explicitly initialized in the copy constructor [-Wextra] +// makes no practical sense +#pragma GCC diagnostic ignored "-Wextra" +#pragma GCC diagnostic push CModelRun (const CModelRun&) : tx (t0, tstep, tlo, thi) { @@ -83,6 +87,8 @@ class CModelRun { throw runtime_error ("nono"); } +#pragma GCC diagnostic pop + CModelRun (CModelRun&&); CModelRun (CSubject&, const string& session, const sigfile::SChannel&, const agh::SProfileParamSet&, diff --git a/upstream/src/aghermann/model/ultradian-cycle.cc b/upstream/src/aghermann/model/ultradian-cycle.cc index 5ba9e5f..6b58979 100644 --- a/upstream/src/aghermann/model/ultradian-cycle.cc +++ b/upstream/src/aghermann/model/ultradian-cycle.cc @@ -56,7 +56,7 @@ uc_cost_function( void *xp) { auto& P = *(SUltradianCyclePPack*)(xp); - agh::beersma::FUltradianCycle F ({P.X[0], P.X[1], P.X[2], P.X[3]}); + agh::beersma::FUltradianCycle F ({P.X[0], P.X[1], P.X[2], P.X[3], NAN}); // if ( (unlikely (F.r > F.ur || F.r < F.lr || // F.T > F.uT || F.T < F.lT || // F.d > F.ud || F.d < F.ld || @@ -75,7 +75,7 @@ uc_siman_step( const gsl_rng *r, void *xp, double step_size) { auto& P = *(SUltradianCyclePPack*)(xp); agh::beersma::SUltradianCycle - Xm = {P.X[0], P.X[1], P.X[2], P.X[3]}, + Xm = {P.X[0], P.X[1], P.X[2], P.X[3], NAN}, X0 = Xm; retry: @@ -136,8 +136,8 @@ uc_siman_metric( void *xp, void *yp) auto& P1 = *(SUltradianCyclePPack*)xp; auto& P2 = *(SUltradianCyclePPack*)yp; agh::beersma::SUltradianCycle - X1 = {P1.X[0], P1.X[1], P1.X[2], P1.X[3]}, - X2 = {P2.X[0], P2.X[1], P2.X[2], P2.X[3]}; + X1 = {P1.X[0], P1.X[1], P1.X[2], P1.X[3], NAN}, + X2 = {P2.X[0], P2.X[1], P2.X[2], P2.X[3], NAN}; return agh::beersma::distance( X1, X2); } @@ -182,7 +182,7 @@ ultradian_cycles( agh::CRecording& M, C.siman_params); // gsl_siman_params_t agh::beersma::SUltradianCycle - X = {P.X[0], P.X[1], P.X[2], P.X[3]}; + X = {P.X[0], P.X[1], P.X[2], P.X[3], NAN}; { FUltradianCycle F (X); @@ -205,15 +205,15 @@ ultradian_cycles( agh::CRecording& M, list agh::beersma:: -analyse_deeper( const SUltradianCycle& C, - agh::CRecording& M, - const agh::beersma::SUltradianCycleCtl& P) +analyse_deeper( const SUltradianCycle&, + agh::CRecording&, + const agh::beersma::SUltradianCycleCtl&) { list ret; - return ret; + return move(ret); } diff --git a/upstream/src/aghermann/ui/mf/mf.cc b/upstream/src/aghermann/ui/mf/mf.cc index 43d679b..f4d7184 100644 --- a/upstream/src/aghermann/ui/mf/mf.cc +++ b/upstream/src/aghermann/ui/mf/mf.cc @@ -123,7 +123,7 @@ SModelrunFacility:: void SModelrunFacility:: -siman_param_printer( void *xp) +siman_param_printer( void* /* xp */) { // memcpy( __t_set.tunables, xp, __t_set.n_tunables * sizeof(double)); // access this directly, no? diff --git a/upstream/src/ag
[med-svn] [aghermann] 01/85: Include samplerate libs during compilation of libsigproc
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 87165d2d561cf39b9b9fa0e74b9d3bbe1d6af20b Author: Ampelbein Date: Sun Aug 25 21:25:53 2013 +0200 Include samplerate libs during compilation of libsigproc On Ubuntu, compilation fails with this error: libtool: link: g++ -Wall -std=c++0x -fno-rtti -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I [...] ../libsigproc/.libs/libsigproc.so: undefined reference to `src_simple' collect2: error: ld returned 1 exit status All needed libraries have to explicitly added to the linker command line. The proposed change does that. --- upstream/src/libsigproc/Makefile.am |3 +++ 1 file changed, 3 insertions(+) diff --git a/upstream/src/libsigproc/Makefile.am b/upstream/src/libsigproc/Makefile.am index 0b2da12..2023ed8 100644 --- a/upstream/src/libsigproc/Makefile.am +++ b/upstream/src/libsigproc/Makefile.am @@ -11,6 +11,9 @@ libsigproc_la_SOURCES := \ sigproc.cc sigproc.hh sigproc.ii \ winfun.cc winfun.hh +libsigproc_la_LIBADD := \ + $(SAMPLERATE_LIBS) + libsigproc_la_LDFLAGS := \ -avoid-version \ -rpath $(libdir)/$(PACKAGE) \ -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 16/85: SF: patterns fixes and improvements
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit d9db86c5537166be13644af898b410520615db2c Author: Andrei Zavada Date: Tue Sep 10 02:21:07 2013 +0300 SF: patterns fixes and improvements * load patterns from symlinked files; * rename, not delete, bad files in various pattern locations; * regression fixes. --- upstream/ChangeLog |4 + upstream/src/aghermann/patterns/patterns.cc| 180 ++-- upstream/src/aghermann/patterns/patterns.hh|7 +- upstream/src/aghermann/patterns/patterns.ii|2 +- .../src/aghermann/ui/sf/d/patterns-profiles.cc |4 +- .../src/aghermann/ui/sf/d/patterns-profiles_cb.cc |6 +- 6 files changed, 110 insertions(+), 93 deletions(-) diff --git a/upstream/ChangeLog b/upstream/ChangeLog index db22760..a12124b 100644 --- a/upstream/ChangeLog +++ b/upstream/ChangeLog @@ -1,5 +1,9 @@ v.0.9.2 (2013-xx-xx) * Separate upstream tree from various distribution-related files. + * SF: trivial optimisation in pattern search. + * SF: load patterns from symlinked files. + * SF: don't blindly delete files in various pattern locations, + just append ~ to their file names. v.0.9.1.1 (2013-07-24) * Fix 32-bit builds where sizeof(size_t) != sizeof(unsigned long). diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index b4289d9..2062d51 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -34,87 +34,6 @@ template int CPatternTool::do_search( const valarray&, size_t); namespace agh { namespace pattern { -template <> -int -agh::pattern::SPattern:: -load( const string& fname_) -{ -const auto& fname = fname_.c_str(); - -FILE *fd = fopen( fname, "r"); -if ( fd ) { -size_t full_sample; -double t1, t2, t3, t4; -if ( fscanf( fd, - "%lg %u %lg %lg %lg %lg %u" - " %lg %lg %lg %lg" - " %zu %zu %zu %zu\n" - "--DATA--\n", - &Pp.env_scope, - &Pp.bwf_order, &Pp.bwf_ffrom, &Pp.bwf_fupto, - &Pp.dzcdf_step, &Pp.dzcdf_sigma, &Pp.dzcdf_smooth, - &t1, &t2, &t3, &t4, - &samplerate, &context.first, &context.second, - &full_sample) == 15 ) { - -criteria = CMatch(t1, t2, t3, t4); - -if ( samplerate == 0 || samplerate > 4096 || - full_sample == 0 || full_sample > samplerate * 10 || - context.first > samplerate * 2 || - context.second > samplerate * 2 || - not Pp.is_sane() ) { -string msg = agh::str::sasprintf( -"load_pattern(\"%s\"): bogus data in header; removing file", -fname); -fprintf( stderr, "%s\n", msg.c_str()); -thing.resize( 0); -fclose( fd); -unlink( fname); -return -3; -} - -thing.resize( full_sample); -for ( size_t i = 0; i < full_sample; ++i ) { -double d; -if ( fscanf( fd, "%la", &d) != 1 ) { -string msg = agh::str::sasprintf( -"load_pattern(\"%s\"): short read at sample %zu; removing file", -fname, i); -fprintf( stderr, "%s\n", msg.c_str()); -thing.resize( 0); -fclose( fd); -unlink( fname); -throw invalid_argument (msg); -} else -thing[i] = d; -} - -} else { -thing.resize( 0); -string msg = agh::str::sasprintf( "load_pattern(\"%s\"): bad header, so removing file", fname); -fprintf( stderr, "%s\n", msg.c_str()); -fclose( fd); -unlink( fname); -return -2; -} - -fclose( fd); - -} else { -string msg = agh::str::
[med-svn] [aghermann] 18/85: Merge pull request #2 from Ampelbein/patch-1
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit b7b82eb283314535eb45e56fec78a5689ad9beec Merge: 89aa285 87165d2 Author: Andrei Zavada Date: Wed Sep 11 01:38:39 2013 -0700 Merge pull request #2 from Ampelbein/patch-1 Include samplerate libs during compilation of libsigproc -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 20/85: collect some loose CExpDesign fields into a struct SProfileCommonPPack
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a2e83d471643538a6710c1a80509652dea87784e Author: Andrei Zavada Date: Thu Sep 12 02:29:07 2013 +0300 collect some loose CExpDesign fields into a struct SProfileCommonPPack --- upstream/src/aghermann/expdesign/expdesign.cc | 38 +++-- upstream/src/aghermann/expdesign/expdesign.hh |8 +-- upstream/src/aghermann/expdesign/recording.hh | 69 +++- upstream/src/aghermann/ui/mw/mw.cc | 18 +++ upstream/src/aghermann/ui/mw/simulations_cb.cc | 35 ++-- 5 files changed, 81 insertions(+), 87 deletions(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.cc b/upstream/src/aghermann/expdesign/expdesign.cc index 175ff28..6e926e5 100644 --- a/upstream/src/aghermann/expdesign/expdesign.cc +++ b/upstream/src/aghermann/expdesign/expdesign.cc @@ -65,25 +65,23 @@ CExpDesign (const string& session_dir_, af_dampen_window_type (sigproc::TWinType::welch), af_dampen_factor (.95), tunables0 (tstep, tlo, thi), // only references here, don't worry -req_percent_scored (80.), -swa_laden_pages_before_SWA_0 (3), strict_subject_id_checks (false), _id_pool (0), config_keys_g ({ SValidator("ctl_param.step_size", &ctl_params0.siman_params.step_size), -SValidator("ctl_param.boltzmann_k", &ctl_params0.siman_params.k,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.t_initial", &ctl_params0.siman_params.t_initial,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.damping_mu", &ctl_params0.siman_params.mu_t, SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.t_min", &ctl_params0.siman_params.t_min,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("profile.req_scored_pc", &req_percent_scored,SValidator::SVFRangeIn( 80., 100.)), -SValidator("fft_param.pagesize", &fft_params.pagesize, SValidator::SVFRangeIn( 4., 120.)), -SValidator("fft_param.binsize", &fft_params.binsize,SValidator::SVFRangeIn( .125, 1.)), -SValidator("artifacts.dampen_factor", &af_dampen_factor, SValidator::SVFRangeIn( 0., 1.)), -SValidator("mc_param.mc_gain", &mc_params.mc_gain, SValidator::SVFRangeIn( 0., 100.)), -SValidator("mc_param.f0fc", &mc_params.f0fc,SValidator::SVFRangeEx( 0., 80.)), -SValidator("mc_param.bandwidth", &mc_params.bandwidth, SValidator::SVFRangeIn( 0.125, 2.)), -SValidator("mc_param.iir_backpolate", &mc_params.iir_backpolate, SValidator::SVFRangeIn( 0., 1.)), -SValidator("swu_param.min_upswing_duration", &swu_params.min_upswing_duration, SValidator::SVFRangeIn( 0.01, 1.)), +SValidator("ctl_param.boltzmann_k", &ctl_params0.siman_params.k,SValidator::SVFRangeEx( DBL_MIN, 1e9)), +SValidator("ctl_param.t_initial", &ctl_params0.siman_params.t_initial,SValidator::SVFRangeEx( DBL_MIN, 1e9)), +SValidator("ctl_param.damping_mu", &ctl_params0.siman_params.mu_t, SValidator::SVFRangeEx( DBL_MIN, 1e9)), +SValidator("ctl_param.t_min", &ctl_params0.siman_params.t_min,SValidator::SVFRangeEx( DBL_MIN, 1e9)), +SValidator("profile.req_scored_pc", &profile_common_params0.req_percent_scored, SValidator::SVFRangeIn( 80., 100.)), +SValidator("fft_param.pagesize", &fft_params.pagesize, SValidator::SVFRangeIn( 4., 120.)), +SValidator("fft_param.binsize", &fft_params.binsize,SValidator::SVFRangeIn( .125, 1.)), +SValidator("artifacts.dampen_factor", &af_dampen_factor, SValidator::SVFRangeIn( 0., 1.)), +SValidator("mc_param.mc_gain", &mc_params.mc_gain, SValidator::SVFRangeIn( 0., 100.)), +SValidator("mc_param.f0fc", &mc_params.f0fc,SValidator::SVFRangeEx( 0., 80.)), +SValidator("mc_param.bandwidth", &mc_params.bandwidth, SValidator::SVFRangeIn( 0.125, 2.)), +SValidator("mc_param.iir_backpolate", &mc_params.iir_backpolate,
[med-svn] [aghermann] 27/85: SF: fix next/prev annotation jump
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit e8bf672c1f466a0e68d5736908bad1beebfa053d Author: Andrei Zavada Date: Sun Sep 15 02:10:31 2013 +0300 SF: fix next/prev annotation jump --- upstream/src/aghermann/ui/sf/montage_cb.cc |6 +++--- upstream/src/aghermann/ui/sf/sf.cc | 14 +++--- upstream/src/aghermann/ui/sf/sf.hh |4 +++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/montage_cb.cc b/upstream/src/aghermann/ui/sf/montage_cb.cc index bdf9475..ac1628c 100644 --- a/upstream/src/aghermann/ui/sf/montage_cb.cc +++ b/upstream/src/aghermann/ui/sf/montage_cb.cc @@ -1071,7 +1071,7 @@ iSFPageAnnotationGotoNext_activate_cb( return; size_t p = SF.cur_vpage(); while ( ++p < SF.total_vpages() ) -if ( SF.page_has_annotations( p, *SF.using_channel)) { +if ( SF.vpage_has_annotations( p, *SF.using_channel)) { SF.sb_clear(); SF.set_cur_vpage( p); return; @@ -1090,9 +1090,9 @@ iSFPageAnnotationGotoPrev_activate_cb( return; size_t p = SF.cur_vpage(); while ( --p != (size_t)-1 ) -if ( SF.page_has_annotations( p, *SF.using_channel)) { +if ( SF.vpage_has_annotations( p, *SF.using_channel)) { SF.sb_clear(); -SF.set_cur_vpage( p); +SF.set_cur_page( p); return; } SF.sb_message( "No more annotations before this"); diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index 05abd01..835c15a 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -631,16 +631,16 @@ page_has_artifacts( const size_t p, const bool search_all) const bool SScoringFacility:: -page_has_annotations( const size_t p, const SChannel& H) const +vpage_has_annotations( const size_t p, const SChannel& H) const { -int half_pad_samples = skirting_run_per1 * vpagesize() * H.samplerate(); -int cvpa = p* pagesize() * H.samplerate() - half_pad_samples, -cvpe = (p+1) * pagesize() * H.samplerate() + half_pad_samples; -for ( auto &A : H.annotations ) -if ( agh::alg::overlap( (int)A.span.a, (int)A.span.z, cvpa, cvpe) ) +for ( auto &A : H.annotations ) { +if ( agh::alg::overlap( + A.span.a, A.span.z, + (p + 0.) * vpagesize(), (p+1.) * vpagesize()) ) return true; -else if ( (int)A.span.a > cvpe ) // no more up to and on current page + else if ( A.span.a > (p+1.) * vpagesize() ) // no more up to and on current page return false; +} return false; } diff --git a/upstream/src/aghermann/ui/sf/sf.hh b/upstream/src/aghermann/ui/sf/sf.hh index 0523f42..6377706 100644 --- a/upstream/src/aghermann/ui/sf/sf.hh +++ b/upstream/src/aghermann/ui/sf/sf.hh @@ -142,6 +142,8 @@ class SScoringFacility size_t cur_page() const { return _cur_page; } size_t cur_vpage() const{ return _cur_vpage; } void set_cur_vpage( size_t p, bool touch_self = true); +void set_cur_page( size_t p, bool touch_self = true) +{ set_cur_vpage( p2ap(p), touch_self); } size_t cur_page_start() const // in seconds @@ -156,7 +158,7 @@ class SScoringFacility { return sigfile::SPage::char2score( hypnogram[_cur_page]); } bool page_has_artifacts( size_t, bool check_all_channels = true) const; -bool page_has_annotations( size_t, const SChannel&) const; +bool vpage_has_annotations( size_t, const SChannel&) const; // pagesize size_t pagesize() const; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 14/85: random whitespace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a5cef01597824a4121facf5cd34e473d94840370 Author: Andrei Zavada Date: Mon Sep 9 18:53:39 2013 +0300 random whitespace --- upstream/src/aghermann/model/achermann.hh| 14 +++ upstream/src/aghermann/model/beersma.hh | 28 ++--- upstream/src/aghermann/model/ultradian-cycle.cc | 25 ++- upstream/src/aghermann/ui/mw/measurements.cc |2 +- upstream/src/aghermann/ui/sf/montage-overlays.cc |7 ++-- upstream/src/aghermann/ui/ui.cc | 18 upstream/src/libmetrics/swu.cc |9 ++-- upstream/src/libsigfile/source-base.cc | 18 upstream/src/libsigfile/tsv.cc |2 +- upstream/src/tools/edfhed.cc | 49 +++--- 10 files changed, 89 insertions(+), 83 deletions(-) diff --git a/upstream/src/aghermann/model/achermann.hh b/upstream/src/aghermann/model/achermann.hh index cc45f8a..0026620 100644 --- a/upstream/src/aghermann/model/achermann.hh +++ b/upstream/src/aghermann/model/achermann.hh @@ -38,7 +38,7 @@ using namespace std; struct SControlParamSet { -boolDBAmendment1, +boolDBAmendment1, DBAmendment2, AZAmendment1, AZAmendment2, @@ -95,14 +95,14 @@ class CModelRun const SControlParamSet&, const STunableSetWithState&); enum TModrunFlags { modrun_tried = 1 }; -intstatus; +int status; SControlParamSet ctl_params; -STunableSettstep; -STunableSettlo; -STunableSetthi; -STunableSett0; -STunableSetWithStatetx; +STunableSet tstep; +STunableSet tlo; +STunableSet thi; +STunableSet t0; +STunableSetWithState tx; int watch_simplex_move( void (*)(void*)); double snapshot(); diff --git a/upstream/src/aghermann/model/beersma.hh b/upstream/src/aghermann/model/beersma.hh index afd5ede..ab2bdc6 100644 --- a/upstream/src/aghermann/model/beersma.hh +++ b/upstream/src/aghermann/model/beersma.hh @@ -32,32 +32,32 @@ namespace beersma { struct SClassicFitWeightedData { -size_tn; -double*y, -*sigma; -intpagesize; -doubleSWA_0, SWA_L; +size_t n; +double *y, + *sigma; +int pagesize; +double SWA_0, SWA_L; }; struct SClassicFit { -doubler; +double r; }; struct SClassicFitCtl { SProfileParamSet P; -doublesigma; -size_titerations; +double sigma; +size_t iterations; }; class FClassicFit { FClassicFit() = delete; FClassicFit( const FClassicFit&) = delete; public: -doubleA, r, b; +double A, r, b; FClassicFit (double A_, double r_, double b_) : A (A_), r (r_), b (b_) {} @@ -77,13 +77,13 @@ classic_fit( agh::CRecording&, struct SUltradianCycle { -doubler, T, d, b; +double r, T, d, b; SUltradianCycle& operator=( const SUltradianCycle&) = default; static constexpr double ir = 0.0001, iT = 1., id = .1, ib = .1, // the last one is a normalized value of metric ur = 0.010, uT = 130., ud = 60., ub = .01, lr = 0.001, lT = 60., ld = -60., lb = .1; -doublecf; +double cf; }; inline double @@ -98,8 +98,8 @@ distance( const SUltradianCycle& lv, } struct SUltradianCycleDetails { -time_tstart, end; -doublemax, avg; +time_t start, end; +double max, avg; }; @@ -107,7 +107,7 @@ struct SUltradianCycleCtl { agh::SProfileParamSet profile_params; -doublesigma; +double sigma; gsl_siman_params_t siman_params; // int n_tries diff --git a/upstream/src/aghermann/model/ultradian-cycle.cc b/upstream/src/aghermann/model/ultradian-cycle.cc index 53e0ecb..ee330e4 100644 --- a/upstream/src/aghermann/model/ultradian-cycle.cc +++ b/upstream/src/aghermann/model/ultradian-cycle.cc @@ -62,7 +62,7 @@ uc_cost_function( void *xp) // F.d > F.ud || F.d < F.ld || // F.b > F.ub || F.b < F.lb) ) ) // return 1e9; -doublecf = 0.; +double cf = 0.; for ( size_t p = 0; p < P.coursep->size(); ++p ) { cf += gsl_pow_2( F(p*P.pagesize/60.) - (*P.coursep)[p]); } @@ -73,7 +73,7 @@ uc_cost_function( void *xp) void uc_siman_step
[med-svn] [aghermann] 17/85: common/fs: use lstat instead of stat
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 89aa2854ec4f770cf2ee1d67a0a1eda18d3ae29d Author: Andrei Zavada Date: Tue Sep 10 02:21:31 2013 +0300 common/fs: use lstat instead of stat --- upstream/src/common/fs.hh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/common/fs.hh b/upstream/src/common/fs.hh index 2dd5f4d..394db72 100644 --- a/upstream/src/common/fs.hh +++ b/upstream/src/common/fs.hh @@ -54,7 +54,7 @@ inline bool exists_and_is_writable( const string& dir) { struct stat attr; -return stat( dir.c_str(), &attr) == 0 && +return lstat( dir.c_str(), &attr) == 0 && S_ISDIR (attr.st_mode) && (attr.st_mode & S_IWUSR) && (attr.st_uid == getuid()); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 04/85: configure.ac: check for delegating constructors c++11 feature
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 25e63f3a119461b08dd390d055518167f9265434 Author: Andrei Zavada Date: Mon Sep 2 15:30:58 2013 +0300 configure.ac: check for delegating constructors c++11 feature --- upstream/configure.ac |1 + 1 file changed, 1 insertion(+) diff --git a/upstream/configure.ac b/upstream/configure.ac index 2936fcb..737b0ea 100644 --- a/upstream/configure.ac +++ b/upstream/configure.ac @@ -32,6 +32,7 @@ ac_cv_cxx_cpp11_features, #include using namespace std; enum class fafa : int { ke, pi }; +class C { C(int) {} C(int x, int) : C(x) {} }; int main (int , char **) { void* p = nullptr; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 25/85: SF: mention subject group in window title
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit e5ef5b6fc144c939a1c563fea018e2cba7a568c0 Author: Andrei Zavada Date: Sun Sep 15 02:07:05 2013 +0300 SF: mention subject group in window title --- upstream/src/aghermann/ui/sf/sf.cc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index 8b096ed..32df137 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -215,7 +215,7 @@ SScoringFacility (agh::CSubject& J, // set window title gtk_window_set_title( (GtkWindow*)wSF, -snprintf_buf( "Scoring: %s’s %s in %s", J.name.c_str(), E.c_str(), D.c_str())); +snprintf_buf( "Scoring: %s in %s of %s (%s)", E.c_str(), D.c_str(), J.name.c_str(), _p.ED->group_of(J))); // align empty area next to EMG profile with spectrum panes vertically // g_object_set( (GObject*)cSFSleepStageStats, -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 07/85: Add patch to fix FTBFS by explicitly adding libsamplerate to the linker command line
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 0eda20130e76322942bdcadfbd540f23159b5018 Author: Andrei Zavada Date: Tue Sep 3 01:28:54 2013 +0300 Add patch to fix FTBFS by explicitly adding libsamplerate to the linker command line as spotted at https://patches.ubuntu.com/a/aghermann/aghermann_0.9.1.1-1ubuntu1.patch --- upstream/src/libsigproc/Makefile.am |3 +++ 1 file changed, 3 insertions(+) diff --git a/upstream/src/libsigproc/Makefile.am b/upstream/src/libsigproc/Makefile.am index 0b2da12..2023ed8 100644 --- a/upstream/src/libsigproc/Makefile.am +++ b/upstream/src/libsigproc/Makefile.am @@ -11,6 +11,9 @@ libsigproc_la_SOURCES := \ sigproc.cc sigproc.hh sigproc.ii \ winfun.cc winfun.hh +libsigproc_la_LIBADD := \ + $(SAMPLERATE_LIBS) + libsigproc_la_LDFLAGS := \ -avoid-version \ -rpath $(libdir)/$(PACKAGE) \ -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 33/85: use return move() where appropriate
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit b6f83066e6695932e6a3aef328bd212d7284813f Author: Andrei Zavada Date: Sun Sep 15 02:21:58 2013 +0300 use return move() where appropriate --- upstream/src/aghermann/expdesign/expdesign.cc |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.cc b/upstream/src/aghermann/expdesign/expdesign.cc index 7295f05..b62033a 100644 --- a/upstream/src/aghermann/expdesign/expdesign.cc +++ b/upstream/src/aghermann/expdesign/expdesign.cc @@ -214,7 +214,7 @@ make_dirname( TExpDirLevel level, const SExpDirLevelId& level_id) const const CSubject& J = subject_by_x(level_id.j, &Gi); if ( level_id.g != Gi->first || !J.have_session(level_id.d) ) throw invalid_argument ("bad group/subject/session"); -return str::sasprintf( "%s/%s/%s/%s", _session_dir.c_str(), Gi->first.c_str(), J.id.c_str(), level_id.d.c_str()); +return move(str::sasprintf( "%s/%s/%s/%s", _session_dir.c_str(), Gi->first.c_str(), J.id.c_str(), level_id.d.c_str())); } case TExpDirLevel::subject: @@ -223,13 +223,13 @@ make_dirname( TExpDirLevel level, const SExpDirLevelId& level_id) const const CSubject& J = subject_by_x(level_id.j, &Gi); if ( level_id.g != Gi->first ) throw invalid_argument ("bad group/subject"); -return str::sasprintf( "%s/%s/%s", _session_dir.c_str(), Gi->first.c_str(), J.id.c_str()); +return move(str::sasprintf( "%s/%s/%s", _session_dir.c_str(), Gi->first.c_str(), J.id.c_str())); } case TExpDirLevel::group: if ( not have_group( level_id.g) ) throw invalid_argument ("bad group"); -return str::sasprintf( "%s/%s", _session_dir.c_str(), level_id.g.c_str()); +return move(str::sasprintf( "%s/%s", _session_dir.c_str(), level_id.g.c_str())); case TExpDirLevel::experiment: return make_dirname(); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 46/85: correctly order #pragma push when ignoring a -Wformat ("%a")
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 49988068d437374b84f60b91d95dc7a30bfe6b34 Author: Andrei Zavada Date: Wed Sep 18 19:22:06 2013 +0300 correctly order #pragma push when ignoring a -Wformat ("%a") --- upstream/src/aghermann/ui/mw/mw.cc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/aghermann/ui/mw/mw.cc b/upstream/src/aghermann/ui/mw/mw.cc index 0a85114..be4b6cb 100644 --- a/upstream/src/aghermann/ui/mw/mw.cc +++ b/upstream/src/aghermann/ui/mw/mw.cc @@ -325,8 +325,8 @@ load_artifact_detection_profiles() char *name = nullptr; int int_estimate_E, int_use_range; // at least gcc 4.7.2 fails to recognize "%as" (dynamic allocation), so -#pragma GCC diagnostic ignored "-Wformat" #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" if ( 16 == fscanf( domien, "%a[^\n]\n%la %la %la %la %la %la %la %la %la %la %la " "%zu %zu %d %d", -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 21/85: new class CSstorablePPack (part 1/2)
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 1a705e0064df7efd9ada25a42cd84642be4643a4 Author: Andrei Zavada Date: Thu Sep 12 19:13:03 2013 +0300 new class CSstorablePPack (part 1/2) --- upstream/src/aghermann/expdesign/Makefile.am |2 + upstream/src/aghermann/expdesign/dirlevel.cc | 41 upstream/src/aghermann/expdesign/dirlevel.hh | 70 + upstream/src/aghermann/expdesign/expdesign.cc | 15 - upstream/src/aghermann/expdesign/expdesign.hh | 13 upstream/src/aghermann/expdesign/forward-decls.hh |2 + upstream/src/aghermann/patterns/patterns.hh |2 +- upstream/src/aghermann/rk1968/rk1968.cc |1 + upstream/src/aghermann/rk1968/rk1968.hh | 13 ++-- 9 files changed, 121 insertions(+), 38 deletions(-) diff --git a/upstream/src/aghermann/expdesign/Makefile.am b/upstream/src/aghermann/expdesign/Makefile.am index 261b0ff..e42cc71 100644 --- a/upstream/src/aghermann/expdesign/Makefile.am +++ b/upstream/src/aghermann/expdesign/Makefile.am @@ -8,6 +8,8 @@ noinst_LIBRARIES := liba.a liba_a_SOURCES := \ forward-decls.hh \ + dirlevel.cc \ + dirlevel.hh \ expdesign.hh \ profile.hh \ expdesign.cc \ diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc new file mode 100644 index 000..0e49339 --- /dev/null +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -0,0 +1,41 @@ +/* + * File name: aghermann/expdesign/dirlevel.cc + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-12 + * + * Purpose: experimental design primary classes: CStorablePPack + * + * License: GPL + */ + + +#include +#include + +#include "dirlevel.hh" + +using namespace std; +using namespace agh; + +const char* +agh:: +exp_dir_level_s( TExpDirLevel x) +{ +switch (x) { +case TExpDirLevel::transient: return "~"; +case TExpDirLevel::subject: return "[S]"; +case TExpDirLevel::experiment: return "[E]"; +case TExpDirLevel::user:return "[U]"; +case TExpDirLevel::system: return ""; +default: return "?"; +} +} + + +// Local Variables: +// Mode: c++ +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh new file mode 100644 index 000..33ceb19 --- /dev/null +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -0,0 +1,70 @@ +/* + * File name: aghermann/expdesign/dirlevel.hh + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-12 + * + * Purpose: experimental design primary classes: CStorable + * class for various ppacks storable at various dir levels + * + * License: GPL + */ + + +#ifndef AGH_AGHERMANN_EXPDESIGN_DIRLEVEL_H_ +#define AGH_AGHERMANN_EXPDESIGN_DIRLEVEL_H_ + + +#include +#include + +#include "common/config-validate.hh" + +#if HAVE_CONFIG_H && !defined(VERSION) +# include "config.h" +#endif + + +namespace agh { + +using namespace std; + +enum class TExpDirLevel { +transient, +subject, +experiment, +user, +system, +}; + +const char* exp_dir_level_s( agh::TExpDirLevel); + + +class CStorablePPack { +public: +TExpDirLevel level; +string subdir, +path; + +boolsaved; + +virtual int load() = 0; +virtual int save() = 0; + +forward_list>config_keys_g; +forward_list> config_keys_d; +forward_list>config_keys_z; +forward_list> config_keys_b; +forward_list>config_keys_s; +}; + +} // namespace agh + +#endif + +// Local Variables: +// Mode: c++ +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/aghermann/expdesign/expdesign.cc b/upstream/src/aghermann/expdesign/expdesign.cc index 6e926e5..fd57bc1 100644 --- a/upstream/src/aghermann/expdesign/expdesign.cc +++ b/upstream/src/aghermann/expdesign/expdesign.cc @@ -26,21 +26,6 @@ using namespace std; using agh::confval::SValidator; -const char* -agh:: -exp_dir_level_s( agh::TExpDirLevel x) -{ -switch (x) { -case TExpDirLevel::transient: return "~"; -case TExpDirLevel::subject: return "[S]"; -case TExpDirLevel::experiment: return "[E]"; -case TExpDirLevel::user:return "[U]"; -case TExpDirLevel::system: return ""; -default: return "?"; -} -}; - - const char *const agh::CExpDesign::FreqBandNames[metrics::TBand::TBand_total] = { diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghe
[med-svn] [aghermann] 19/85: whitespace, rotting commented code removal
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit fda35efc62ee4ba42f685b6a2fb42b3e843f5705 Author: Andrei Zavada Date: Thu Sep 12 02:28:40 2013 +0300 whitespace, rotting commented code removal --- upstream/src/aghermann/expdesign/expdesign.hh | 29 upstream/src/aghermann/ui/mw/simulations_cb.cc |8 +++ 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghermann/expdesign/expdesign.hh index 7c0c354..ecc3324 100644 --- a/upstream/src/aghermann/expdesign/expdesign.hh +++ b/upstream/src/aghermann/expdesign/expdesign.hh @@ -222,7 +222,7 @@ class CExpDesign { for_all_modruns( const TModelRunOpFun&, const TModelRunReportFun&, const TModelRunFilterFun&); // inventory -size_tnum_threads; +size_t num_threads; metrics::psd::SPPack fft_params; metrics::swu::SPPack @@ -231,7 +231,7 @@ class CExpDesign { mc_params; sigproc::TWinType // such a fussy af_dampen_window_type; -doubleaf_dampen_factor; +double af_dampen_factor; static double freq_bands[metrics::TBand::TBand_total][2]; @@ -241,7 +241,7 @@ class CExpDesign { ach::STunableSettstep; ach::STunableSettlo; ach::STunableSetthi; -ach::STunableSetWithStatetunables0; +ach::STunableSetWithState tunables0; ach::SControlParamSet ctl_params0; @@ -253,7 +253,7 @@ class CExpDesign { int load_settings(); int save_settings(); -stringlast_used_version; +string last_used_version; int purge_cached_profiles(); private: @@ -263,17 +263,17 @@ class CExpDesign { load_fail = 2, // irrelevant }; -int_status; -string_session_dir; +int _status; +string _session_dir; list> _error_log; -sid_t_id_pool; +sid_t _id_pool; // load/save forward_list>config_keys_g; -forward_list>config_keys_d; +forward_list> config_keys_d; forward_list>config_keys_z; -forward_list>config_keys_b; +forward_list> config_keys_b; forward_list>config_keys_s; }; @@ -326,17 +326,6 @@ const char* CExpDesign::group_of( const T& jid) throw invalid_argument("no such subject"); } -// template -// bool have_subject( T jid) const -// { -// for ( auto& I : groups ) -// if ( find( I.second.begin(), I.second.end(), jid) != I.second.end() ) -// return true; -// return false; -// } - - - } // namespace agh diff --git a/upstream/src/aghermann/ui/mw/simulations_cb.cc b/upstream/src/aghermann/ui/mw/simulations_cb.cc index 82309ea..709021e 100644 --- a/upstream/src/aghermann/ui/mw/simulations_cb.cc +++ b/upstream/src/aghermann/ui/mw/simulations_cb.cc @@ -84,18 +84,18 @@ iSimulationsRunBatch_activate_cb( use_subjects = agh::str::tokens_trimmed( gtk_entry_get_text( ED.eBatchSetupSubjects), ";"), use_sessions = agh::str::tokens_trimmed( gtk_entry_get_text( ED.eBatchSetupSessions), ";"), use_channels = agh::str::tokens_trimmed( gtk_entry_get_text( ED.eBatchSetupChannels), ";"); -doublefreq_from = gtk_spin_button_get_value( ED.eBatchSetupRangeFrom), +double freq_from = gtk_spin_button_get_value( ED.eBatchSetupRangeFrom), freq_width = gtk_spin_button_get_value( ED.eBatchSetupRangeWidth), freq_inc = gtk_spin_button_get_value( ED.eBatchSetupRangeInc); -size_tfreq_steps = gtk_spin_button_get_value( ED.eBatchSetupRangeSteps); +size_t freq_steps = gtk_spin_button_get_value( ED.eBatchSetupRangeSteps); for ( auto& J : use_subjects ) for ( auto& D : use_sessions ) for ( auto& H : use_channels ) { switch ( ED.display_profile_type ) { case metrics::TType::psd: -{autothis_freq_from = freq_from, -this_freq_upto = freq_from + freq_width; +{ auto this_freq_from = freq_from, + this_freq_upto = freq_from + freq_w
[med-svn] [aghermann] branch master updated (d98386b -> d36d90c)
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a change to branch master in repository aghermann. from d98386b more move semantics new 38a5eaa heed or gag most -Wextra and -Wmissing-field-initializers new 0453af6 tabs to spaces new 25e63f3 configure.ac: check for delegating constructors c++11 feature new 0bd54a4 ICM new 61e02bf more of the same (0453af650) new 0eda201 Add patch to fix FTBFS by explicitly adding libsamplerate to the linker command line new c643f05 ICM (see 61e02bf84ccef) new fd52b84 whitespaaace and a little ICM new 6475f07 ICM new 7dea678 separate struct SScoringFacility::SChannel into own sf/channel.hh new 3f90c12 ICM new 1841440 patterns, rk1968 WIP new a5cef01 random whitespace new e53a80c SF: move common expr out of loop in pattern finding new d9db86c SF: patterns fixes and improvements new 89aa285 common/fs: use lstat instead of stat new 87165d2 Include samplerate libs during compilation of libsigproc new b7b82eb Merge pull request #2 from Ampelbein/patch-1 new fda35ef whitespace, rotting commented code removal new a2e83d4 collect some loose CExpDesign fields into a struct SProfileCommonPPack new 1a705e0 new class CSstorablePPack (part 1/2) new 2360ab7 new class CSstorablePPack (part 2/3) new ab9ede1 WIP new f96203c tree-scanner: make sure subject gets a name (use id if name missing) new e5ef5b6 SF: mention subject group in window title new 0abb643 SF: prettify hint after global tab expand new e8bf672 SF: fix next/prev annotation jump new c14ee9a SF: use SF.csubject() to get subject dir for saving montage svg new d8784f5 identifier renames and whitespace new 0bf1657 don't load profiles twice new 25a9a6e ED: cover all TExpDirLevel values in make_dirname new 7423f23 only select regular files when scanning for profiles new b6f8306 use return move() where appropriate new 4980849 variadic templates for the great good in load_profiles_from_location new c1b39a0 load_profiles_from_location didn't correctly construct full path to profiles new 2435081 routine enhancements in CStorablePPack new 75d2a8a some whitespace new 3f15569 don't try to save empty patterns even if no such thing exists new 99ba6eb fix pattern name handling, don't read an rvalue after it's gone new 1b16bc8 fix remaining regressions in patterns new db4f29b always load/save on show/hide of patters dialog new a24ee82 update Changelog new 944228e split sf/montage_cb.cc new 737f8d5 sink abstract common widgets and callbacks dealing with dir-level profiles new 4998806 correctly order #pragma push when ignoring a -Wformat ("%a") new 3c67754 whitespace new 55494a1 experiment-dl.sh is actually installed "$PACKAGE_DATADIR/aghermann" new 65b964b Create README.md new 40424bc Merge branch 'master' of github.com:hmmr/aghermann new e3e9071 use decltype for good purpose in AGH_GBGETOBJ macro new f934c9f set 'saved' profile field to false so it can be actually saved by save() new 677d4e2 tweaks to wAbout, wSFRK new e493ebc every little debugging helps new 055316a proper operators = and == for SPattern, SScoreAssistantPPack and CStorablePPack new 053d1c8 CStorablePPack::delete_file() is virtual fair enough new f031900 eX_any_profile_value_changed_cb belongs to a base class, too new 31dc79c anon namespace within extern "C" is pointless new 85fbc32 let the rk1968 widgets be shown new a23de32 move some project-wide filenames to very toplevel project_strings.h new 3d863fc whitespace new 58335bb include edfhed.glade into aghermann.gresource, have edfhef-gtk make use of common aghermann/ui code new 1eedcdc static is useless in a main.cc, isn't it? new a9944a0 make configure.ac print g++ --version in summary new 8351c4f size-group for profile mgmt buttons new 600b4be yet better AGH_GBGETOBJ new cad484b whitespace and trivial ICM new a2fd008 split heavy itpp-dependent inline cairo_draw_signal from ui.hh new d94b560 fixes in rk1968 profile handling new 291c2ec enable dirlevel profiles for artifacts, too new 601c64f complete a2fd0082b00655 new ad0311b addendum to 291c2ec59508 new 4318e63 addendum to 291c2ec5950845 new 181469f painstaking dbl_cmp, feat. DBL_EPSILON new 95397a9 autogen.sh: look for .ac files also in /usr/share/aclocal/ac-archive new 2c8
[med-svn] [aghermann] 39/85: fix pattern name handling, don't read an rvalue after it's gone
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 99ba6eb01fe503b66b5c8e8f771e5c6d310ae69b Author: Andrei Zavada Date: Sun Sep 15 02:32:34 2013 +0300 fix pattern name handling, don't read an rvalue after it's gone --- upstream/src/aghermann/patterns/patterns.cc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 47a4a1a..2943cef 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -98,8 +98,8 @@ load( const string& fname_) string msg; using agh::str::sasprintf; -const char* fname = fname_.c_str(); - +auto fname_ = path(); +auto fname = fname_.c_str(); FILE *fd = NULL; try { -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 43/85: split sf/montage_cb.cc
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 944228ec3a1f25d349301478d3760c1143911a84 Author: Andrei Zavada Date: Sun Sep 15 02:52:47 2013 +0300 split sf/montage_cb.cc --- upstream/src/aghermann/ui/sf/Makefile.am |1 + .../ui/sf/{montage_cb.cc => montage-menus_cb.cc} | 509 +--- upstream/src/aghermann/ui/sf/montage_cb.cc | 862 3 files changed, 3 insertions(+), 1369 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/Makefile.am b/upstream/src/aghermann/ui/sf/Makefile.am index 841d52c..7737f4a 100644 --- a/upstream/src/aghermann/ui/sf/Makefile.am +++ b/upstream/src/aghermann/ui/sf/Makefile.am @@ -20,6 +20,7 @@ liba_a_SOURCES := \ montage-overlays.cc \ montage.cc \ montage_cb.cc \ + montage-menus_cb.cc \ sf.cc \ sf.hh \ sf_cb.cc \ diff --git a/upstream/src/aghermann/ui/sf/montage_cb.cc b/upstream/src/aghermann/ui/sf/montage-menus_cb.cc similarity index 57% copy from upstream/src/aghermann/ui/sf/montage_cb.cc copy to upstream/src/aghermann/ui/sf/montage-menus_cb.cc index dcf8310..579d359 100644 --- a/upstream/src/aghermann/ui/sf/montage_cb.cc +++ b/upstream/src/aghermann/ui/sf/montage-menus_cb.cc @@ -1,17 +1,14 @@ /* - * File name: aghermann/ui/sf/montage_cb.cc + * File name: aghermann/ui/sf/montage-menus_cb.cc * Project: Aghermann * Author: Andrei Zavada * Initial version: 2011-07-02 * - * Purpose: scoring facility: montage drawing area callbacks + * Purpose: scoring facility: montage menu callbacks * * License: GPL */ -#include -#include - #include "aghermann/ui/misc.hh" #include "aghermann/ui/mw/mw.hh" #include "channel.hh" @@ -31,508 +28,6 @@ using agh::str::homedir2tilda; extern "C" { -gboolean -daSFMontage_configure_event_cb( -GtkWidget*, -GdkEventConfigure *event, -const gpointer userdata) -{ - if ( event->type == GDK_CONFIGURE ) { - auto& SF = *(SScoringFacility*)userdata; - SF.da_wd = event->width; - // don't care about height: it's our own calculation - } - return FALSE; -} - - - - -// Page - -gboolean -daSFMontage_draw_cb( -GtkWidget*, -cairo_t *cr, -const gpointer userdata) -{ -auto& SF = *(SScoringFacility*)userdata; -SF.draw_montage( cr); -return TRUE; -} - - -namespace { -void -radio_item_setter( GtkWidget *i, const gpointer u) -{ -const char *label = gtk_menu_item_get_label( (GtkMenuItem*)i); -if ( strcmp(label, (const char*)u) == 0 ) -gtk_check_menu_item_set_active( (GtkCheckMenuItem*)i, TRUE); -} -} // namespace - - -gboolean -daSFMontage_button_press_event_cb( -GtkWidget *wid, -GdkEventButton *event, -const gpointer userdata) -{ -auto& SF = *(SScoringFacility*)userdata; - -if ( SF.mode == SScoringFacility::TMode::showing_ics ) { -if ( SF.ica_components.size() == 0 ) -return TRUE; - -SF.using_ic = SF.ic_near( event->y); - -if ( event->button == 1 && - (SF.remix_mode == SScoringFacility::TICARemixMode::punch || - SF.remix_mode == SScoringFacility::TICARemixMode::zero) ) { -SF.ica_map[SF.using_ic].m = -(SF.ica_map[SF.using_ic].m == -1) ? 0 : -1; -gtk_widget_queue_draw( wid); -} else if ( SF.remix_mode == SScoringFacility::TICARemixMode::map ) { -const char *mapped = -(SF.ica_map[SF.using_ic].m != -1) -? SF.channel_by_idx( SF.ica_map[SF.using_ic].m) . name() -: SScoringFacility::ica_unmapped_menu_item_label; -SF.suppress_redraw = true; -gtk_container_foreach( -(GtkContainer*)SF.iiSFICAPage, -radio_item_setter, (gpointer)mapped); -SF.suppress_redraw = false; -gtk_menu_popup( SF.iiSFICAPage, -NULL, NULL, NULL, NULL, 3, event->time); -} -return TRUE; -} - -if ( SF.mode == SScoringFacility::TMode::showing_remixed ) { -if ( SF.ica_components.size() == 0 ) -return TRUE; - -SF.using_channel = SF.channel_near( event->y); -//SF.using_ic = SF.ic_of( SF.using_channel); - -if ( event->button == 1 ) { -SF.using_channel->apply_reconstituted = -!SF.using_c
[med-svn] [aghermann] 42/85: update Changelog
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a24ee8202c6f0b54f6c2b1bb2b7d876891deff5d Author: Andrei Zavada Date: Sun Sep 15 02:35:52 2013 +0300 update Changelog --- upstream/ChangeLog |4 1 file changed, 4 insertions(+) diff --git a/upstream/ChangeLog b/upstream/ChangeLog index a12124b..7c364d5 100644 --- a/upstream/ChangeLog +++ b/upstream/ChangeLog @@ -4,6 +4,10 @@ v.0.9.2 (2013-xx-xx) * SF: load patterns from symlinked files. * SF: don't blindly delete files in various pattern locations, just append ~ to their file names. + * SF: fix jump to next/prev annotations. + * Use subject ID in place of name if the latter is missing. + * Properly handle various system/user/experiment/subject/session + stored settings packs (patterns, rk1968, etc). v.0.9.1.1 (2013-07-24) * Fix 32-bit builds where sizeof(size_t) != sizeof(unsigned long). -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 37/85: some whitespace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 75d2a8a273c1ceec98119e375f0ab39fb9365de7 Author: Andrei Zavada Date: Sun Sep 15 02:29:11 2013 +0300 some whitespace --- upstream/src/aghermann/patterns/patterns.cc | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 9ce6dd2..35ca0b8 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -103,7 +103,7 @@ load( const string& fname_) try { { struct stat attr; -if ( 0 != lstat( fname, &attr) ||!S_ISREG (attr.st_mode) ) +if ( 0 != lstat( fname, &attr) || !S_ISREG (attr.st_mode) ) return -1; } @@ -112,17 +112,18 @@ load( const string& fname_) size_t full_sample; double t1, t2, t3, t4; -if ( 15 != fscanf( fd, - "%lg %u %lg %lg %lg %lg %u" - " %lg %lg %lg %lg" - " %zu %zu %zu %zu\n" - "--DATA--\n", - &Pp.env_scope, - &Pp.bwf_order, &Pp.bwf_ffrom, &Pp.bwf_fupto, - &Pp.dzcdf_step, &Pp.dzcdf_sigma, &Pp.dzcdf_smooth, - &t1, &t2, &t3, &t4, - &samplerate, &context.first, &context.second, - &full_sample) ) { +if ( 15 != fscanf( + fd, + "%lg %u %lg %lg %lg %lg %u" + " %lg %lg %lg %lg" + " %zu %zu %zu %zu\n" + "--DATA--\n", + &Pp.env_scope, + &Pp.bwf_order, &Pp.bwf_ffrom, &Pp.bwf_fupto, + &Pp.dzcdf_step, &Pp.dzcdf_sigma, &Pp.dzcdf_smooth, + &t1, &t2, &t3, &t4, + &samplerate, &context.first, &context.second, + &full_sample) ) { throw invalid_argument ("Bogus data in header"); } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 40/85: fix remaining regressions in patterns
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 1b16bc850bfa2d714504bc62d32e93c471d6ca1b Author: Andrei Zavada Date: Sun Sep 15 02:35:04 2013 +0300 fix remaining regressions in patterns --- upstream/src/aghermann/patterns/patterns.cc| 62 +-- upstream/src/aghermann/patterns/patterns.hh| 194 ++-- .../src/aghermann/ui/sf/d/patterns-profiles.cc | 55 +++--- .../src/aghermann/ui/sf/d/patterns-profiles_cb.cc | 36 ++-- upstream/src/aghermann/ui/sf/d/patterns.cc | 22 ++- upstream/src/aghermann/ui/sf/d/patterns.hh |4 +- 6 files changed, 209 insertions(+), 164 deletions(-) diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 2943cef..8bb6434 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -22,6 +22,9 @@ using namespace std; using namespace agh::pattern; +namespace agh { +namespace pattern { + template CPatternTool::CPatternTool( const sigproc::SSignalRef&, const TContext&, const SPatternPPack&); template int CPatternTool::do_search( const valarray&, const valarray&, const valarray&, const valarray&, size_t); template int CPatternTool::do_search( const sigproc::SSignalRef&, size_t); @@ -29,29 +32,29 @@ template int CPatternTool::do_search( const valarray&, size_t); - - -namespace agh { -namespace pattern { +using confval::SValidator; template <> int -agh::pattern::SPattern:: +SPattern:: save() { -if ( saved || origin == agh::TExpDirLevel::transient || origin == agh::TExpDirLevel::system ) +if ( saved || level == agh::TExpDirLevel::transient || level == agh::TExpDirLevel::system ) return 0; if ( thing.size() == 0 ) { fprintf( stderr, "save_pattern(\"%s\"): thing is empty\n", path().c_str()); -if ( agh::fs::mkdir_with_parents( agh::fs::dirname(path)) ) { -fprintf( stderr, "save_pattern(\"%s\"): mkdir failed\n", path.c_str()); return -1; } -printf( "saving pattern in %s\n", path.c_str()); -FILE *fd = fopen( path.c_str(), "w"); +if ( agh::fs::mkdir_with_parents( agh::fs::dirname(path())) ) { +fprintf( stderr, "save_pattern(\"%s\"): mkdir failed\n", path().c_str()); +return -1; +} + +string fname {path()}; +FILE *fd = fopen( fname.c_str(), "w"); try { if ( !fd ) throw -2; @@ -66,13 +69,13 @@ save() get<0>(criteria), get<1>(criteria), get<2>(criteria), get<3>(criteria), samplerate, context.first, context.second, thing.size()) < 1 ) { -fprintf( stderr, "save_pattern(\"%s\"): write failed\n", path.c_str()); +fprintf( stderr, "save_pattern(\"%s\"): write failed\n", fname.c_str()); throw -3; } for ( size_t i = 0; i < thing.size(); ++i ) if ( fprintf( fd, "%a\n", (double)thing[i]) < 1 ) { -fprintf( stderr, "save_pattern(\"%s\"): write failed\n", path.c_str()); +fprintf( stderr, "save_pattern(\"%s\"): write failed\n", fname.c_str()); throw -3; } fclose( fd); @@ -93,7 +96,7 @@ save() template <> int agh::pattern::SPattern:: -load( const string& fname_) +load() { string msg; using agh::str::sasprintf; @@ -129,7 +132,7 @@ load( const string& fname_) throw invalid_argument ("Bogus data in header"); } -criteria = CMatch(t1, t2, t3, t4); +criteria = CMatch(t1, t2, t3, t4); if ( samplerate == 0 || samplerate > 4096 || full_sample == 0 || full_sample > samplerate * 10 || @@ -151,7 +154,6 @@ load( const string& fname_) printf( "loaded pattern in %s\n", fname); saved = true; name = agh::str::tokens( fname, "/").back(); -path = fname; return 0; @@ -172,11 +174,39 @@ load( const string& fname_) template <> +SPattern:: +SPattern (const string& name_, TExpDirLevel level_, CExpDesign& ED_, const SExpDirLevelId& level_id_) + : CStorablePPack (".patterns", name_, level_, ED_, level_id_), +samplerate (0), +context ({0, 0}) +{ +config_keys_g.assign({ +SValidator("env_scope",&Pp.env_scope), +SValidator("bwf_ffrom",&Pp.bwf_ffrom), +SValidator("bwf_fupto",&Pp.bwf_fupto), +SValidator("dzcdf_
[med-svn] [aghermann] 23/85: WIP
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit ab9ede1b4bfb5021840a66046fe10f809f80af48 Author: Andrei Zavada Date: Fri Sep 13 19:38:56 2013 +0300 WIP --- upstream/src/aghermann/expdesign/dirlevel.cc | 10 upstream/src/aghermann/expdesign/dirlevel.hh | 10 upstream/src/aghermann/expdesign/expdesign.hh | 38 +++ upstream/src/aghermann/patterns/patterns.cc| 42 - upstream/src/aghermann/patterns/patterns.hh| 49 +++- upstream/src/aghermann/rk1968/rk1968-profiles.cc | 41 upstream/src/aghermann/rk1968/rk1968.cc|6 +-- upstream/src/aghermann/rk1968/rk1968.hh|6 +-- .../src/aghermann/ui/sf/d/patterns-profiles.cc |7 ++- .../src/aghermann/ui/sf/d/patterns-profiles_cb.cc | 19 ++-- upstream/src/aghermann/ui/sf/d/rk1968-profiles.cc |2 +- 11 files changed, 79 insertions(+), 151 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index ffee6fd..c6b44e2 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -10,6 +10,7 @@ */ +#include #include #include @@ -21,6 +22,15 @@ using namespace std; using namespace agh; + +int +simple_scandir_filter( const struct dirent *e) +{ +return strcmp( e->d_name, ".") && strcmp( e->d_name, ".."); +} + + + const char* agh:: exp_dir_level_s( TExpDirLevel x) diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index 7458255..ac3fa85 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -15,6 +15,8 @@ #define AGH_AGHERMANN_EXPDESIGN_DIRLEVEL_H_ +#include + #include #include @@ -85,6 +87,14 @@ class CStorablePPack { forward_list>config_keys_s; }; + + + +int simple_scandir_filter( const struct dirent*); + + + + } // namespace agh #endif diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghermann/expdesign/expdesign.hh index 0e2d50d..156a173 100644 --- a/upstream/src/aghermann/expdesign/expdesign.hh +++ b/upstream/src/aghermann/expdesign/expdesign.hh @@ -323,6 +323,44 @@ const char* CExpDesign::group_of( const T& jid) } + +template +list +load_profiles_from_location( agh::TExpDirLevel level, agh::CExpDesign& ED, const agh::SExpDirLevelId& level_id, + Args... args) +{ +list ret; + +string location = ED.make_dirname( level, level_id); + +struct dirent **eps; +int total = scandir( location.c_str(), &eps, simple_scandir_filter, alphasort); + +if ( total != -1 ) { +for ( int i = 0; i < total; ++i ) { +struct stat attr; +const string fname = location + '/' + eps[i]->d_name; +if ( 0 == lstat( fname.c_str(), &attr) && S_ISREG (attr.st_mode) && + '~' != fname.back() ) +try { +ret.emplace_back( +eps[i]->d_name, level, ED, level_id, +args...); +ret.back().load(); +} catch (invalid_argument& ex) { +; +} +free( eps[i]); +} +free( (void*)eps); +} + +//printf("found %zu profiles in %s\n", ret.size(), agh::exp_dir_level_s(origin)); +return move(ret); +} + + + } // namespace agh #endif diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 2062d51..9ce6dd2 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -178,48 +178,6 @@ delete_file() -namespace { -int -scandir_filter( const struct dirent *e) -{ -return strcmp( e->d_name, ".") && strcmp( e->d_name, ".."); -} -} - - -template <> -list> -load_patterns_from_location( const string& loc, agh::TExpDirLevel origin) -{ -list> -ret; - -struct dirent **eps; -int total = scandir( loc.c_str(), &eps, scandir_filter, alphasort); - -if ( total != -1 ) { -for ( int i = 0; i < total; ++i ) { -const string fname = loc + '/' + eps[i]->d_name; -struct stat attr; -if ( 0 == lstat( fname.c_str(), &attr) && S_ISREG (attr.st_mode) && - '~' != fname.back() ) -try { -
[med-svn] [aghermann] 38/85: don't try to save empty patterns even if no such thing exists
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 3f15569d7bbf2487f090fdceaaf5df33d3c38c38 Author: Andrei Zavada Date: Sun Sep 15 02:30:21 2013 +0300 don't try to save empty patterns even if no such thing exists --- upstream/src/aghermann/patterns/patterns.cc |2 ++ 1 file changed, 2 insertions(+) diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 35ca0b8..47a4a1a 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -43,6 +43,8 @@ save() if ( saved || origin == agh::TExpDirLevel::transient || origin == agh::TExpDirLevel::system ) return 0; +if ( thing.size() == 0 ) { +fprintf( stderr, "save_pattern(\"%s\"): thing is empty\n", path().c_str()); if ( agh::fs::mkdir_with_parents( agh::fs::dirname(path)) ) { fprintf( stderr, "save_pattern(\"%s\"): mkdir failed\n", path.c_str()); return -1; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 29/85: identifier renames and whitespace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit d8784f5422fc1c51bcb41c7151254506295dcb0d Author: Andrei Zavada Date: Sun Sep 15 02:17:34 2013 +0300 identifier renames and whitespace --- upstream/src/aghermann/expdesign/dirlevel.hh |5 ++-- upstream/src/aghermann/expdesign/tree-scanner.cc |3 +-- upstream/src/aghermann/patterns/patterns.hh|6 ++--- upstream/src/aghermann/ui/sf/controls_cb.cc|4 ++-- .../src/aghermann/ui/sf/d/patterns-profiles.cc | 24 ++-- upstream/src/aghermann/ui/sf/sf.cc |2 +- upstream/src/aghermann/ui/sf/sf.hh |2 +- upstream/src/common/config-validate.hh |4 ++-- 8 files changed, 29 insertions(+), 21 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index ac3fa85..d52c8bd 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -4,8 +4,8 @@ * Author: Andrei Zavada * Initial version: 2013-09-12 * - * Purpose: experimental design primary classes: CStorable - * class for various ppacks storable at various dir levels + * Purpose: experimental design primary classes: CStorable + * class for various ppacks storable at various dir levels * * License: GPL */ @@ -80,6 +80,7 @@ class CStorablePPack { void touch() { saved = false; } +protected: forward_list>config_keys_g; forward_list> config_keys_d; forward_list>config_keys_z; diff --git a/upstream/src/aghermann/expdesign/tree-scanner.cc b/upstream/src/aghermann/expdesign/tree-scanner.cc index 8f02ab4..844d3fd 100644 --- a/upstream/src/aghermann/expdesign/tree-scanner.cc +++ b/upstream/src/aghermann/expdesign/tree-scanner.cc @@ -144,7 +144,7 @@ register_intree_source( sigfile::CTypedSource&& F, string& g_name = (pe = next(pe), *pe), j_name = (pe = next(pe), *pe), d_name = (pe = next(pe), *pe); -stringe_name = +string e_name = fs::make_fname_base( *next(pe), sigfile::supported_sigfile_extensions, @@ -355,7 +355,6 @@ scan_tree( TMsmtCollectProgressIndicatorFun user_progress_fun) J.measurements.erase(D.first); goto startover; } - list complete_session_set = enumerate_sessions(); // calculate average episode times diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index dacd07f..ae9c9c1 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -240,11 +240,9 @@ struct SPattern : public CStorablePPack { pattern_length_essential() const { return (double)pattern_size_essential() / samplerate; } -int -load( const string&); -int -save(); +int load(); +int save(); int delete_file(); diff --git a/upstream/src/aghermann/ui/sf/controls_cb.cc b/upstream/src/aghermann/ui/sf/controls_cb.cc index 98908b0..06b832e 100644 --- a/upstream/src/aghermann/ui/sf/controls_cb.cc +++ b/upstream/src/aghermann/ui/sf/controls_cb.cc @@ -143,7 +143,7 @@ bSFGotoPrevArtifact_clicked_cb( size_t p = SF.cur_vpage(); while ( --p != (size_t)-1 ) -if ( SF.page_has_artifacts( p, false)) { +if ( SF.vpage_has_artifacts( p, false)) { SF.sb_clear(); SF.set_cur_vpage( p); return; @@ -161,7 +161,7 @@ bSFGotoNextArtifact_clicked_cb( return; size_t p = SF.cur_vpage(); while ( ++p < SF.total_vpages() ) -if ( SF.page_has_artifacts( p)) { +if ( SF.vpage_has_artifacts( p)) { SF.sb_clear(); SF.set_cur_vpage( p); return; diff --git a/upstream/src/aghermann/ui/sf/d/patterns-profiles.cc b/upstream/src/aghermann/ui/sf/d/patterns-profiles.cc index 36eec72..97a1762 100644 --- a/upstream/src/aghermann/ui/sf/d/patterns-profiles.cc +++ b/upstream/src/aghermann/ui/sf/d/patterns-profiles.cc @@ -132,6 +132,16 @@ load_patterns() } + +void +SScoringFacility::SPatternsDialog:: +save_patterns() +{ +for ( auto& P : patterns ) +P.save(); +} + + void SScoringFacility::SPatternsDialog:: populate_combo() @@ -162,13 +172,13 @@ populate_combo() -void -SScoringFacility::SPatternsDial
[med-svn] [aghermann] 31/85: ED: cover all TExpDirLevel values in make_dirname
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 25a9a6e9f1fc019e01a39e4e7c870bf5ca6b6bc7 Author: Andrei Zavada Date: Sun Sep 15 02:20:08 2013 +0300 ED: cover all TExpDirLevel values in make_dirname --- upstream/src/aghermann/expdesign/expdesign.cc |9 + 1 file changed, 9 insertions(+) diff --git a/upstream/src/aghermann/expdesign/expdesign.cc b/upstream/src/aghermann/expdesign/expdesign.cc index 0ef1d7f..7295f05 100644 --- a/upstream/src/aghermann/expdesign/expdesign.cc +++ b/upstream/src/aghermann/expdesign/expdesign.cc @@ -205,6 +205,9 @@ CExpDesign:: make_dirname( TExpDirLevel level, const SExpDirLevelId& level_id) const { switch (level) { +case TExpDirLevel::transient: +return "/tmp"; + case TExpDirLevel::session: { TJGroups::const_iterator Gi; @@ -231,6 +234,12 @@ make_dirname( TExpDirLevel level, const SExpDirLevelId& level_id) const case TExpDirLevel::experiment: return make_dirname(); +case TExpDirLevel::user: +return move(str::sasprintf( "%s/.local/share/aghermann", getenv("HOME"))); + +case TExpDirLevel::system: +return PACKAGE_DATADIR "/patterns"; + default: throw invalid_argument ("level not appropriate"); } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 32/85: only select regular files when scanning for profiles
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 7423f23049fc69ad5f7aa9543a72eca4f848ac23 Author: Andrei Zavada Date: Sun Sep 15 02:21:12 2013 +0300 only select regular files when scanning for profiles --- upstream/src/aghermann/expdesign/dirlevel.cc |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index c6b44e2..fd6 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -24,9 +24,10 @@ using namespace agh; int +agh:: simple_scandir_filter( const struct dirent *e) { -return strcmp( e->d_name, ".") && strcmp( e->d_name, ".."); +return e->d_type == DT_REG; } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 26/85: SF: prettify hint after global tab expand
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 0abb643cc6c7624c59b6c329038dbf933ae59e5b Author: Andrei Zavada Date: Sun Sep 15 02:07:52 2013 +0300 SF: prettify hint after global tab expand --- upstream/src/aghermann/ui/sf/sf.cc | 42 ++-- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index 32df137..05abd01 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -808,32 +808,32 @@ sb_clear() const const char* const SScoringFacility::tooltips[2] = { "Page views:\n" -" Wheel:adjust display scale;\n" -" Ctrl+Wheel:change scale for\n" -"all channels;\n" -" Click2:reset display scale;\n" -" Move1:mark selection;\n" -" Alt+Move1:move channel around\n" -"in montage;\n" -" Alt+Wheel:change montage height;\n" +" Wheel: adjust display scale;\n" +" Ctrl+Wheel: change scale for\n" +" all channels;\n" +" Click2: reset display scale;\n" +" Move1: mark selection;\n" +" Alt+Move1: move channel around\n" +" / shift selection;\n" +" Alt+Wheel: change montage height;\n" " on profile:\n" -" Click1:position cursor;\n" -" Click2:bands/discrete 1Hz bins.\n" -" Shift+Wheel:cycle focused PSD band\n" -"/ in-/decrement bin;\n" -" Wheel:in-/decrement scale;\n" -" Ctrl+Wheel:in-/decrement scale for all.\n" -" Alt+1..9:context menu for channels 1..9\n" +" Click1: position cursor;\n" +" Click2: bands/discrete 1Hz bins.\n" +" Shift+Wheel:cycle focused PSD band\n" +" / in-/decrement bin;\n" +" Wheel: in-/decrement scale;\n" +" Ctrl+Wheel: in-/decrement scale for all.\n" +" Alt+1..9: context menu for channels 1..9\n" "\n" "Hypnogram:\n" -" Click1:position cursor;\n" -" Click2:alt view;\n" -" Click3:context menu.", +" Click1: position cursor;\n" +" Click2: alt view;\n" +" Click3: context menu.", "ICA:\n" -" Wheel:adjust display scale;\n" -" Click1:\"apply\" toggle;\n" -" Click3:IC map context menu.\n", +" Wheel: adjust display scale;\n" +" Click1: \"apply\" toggle;\n" +" Click3: IC map context menu.\n", }; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 51/85: set 'saved' profile field to false so it can be actually saved by save()
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit f934c9fc4d2a6ef69d46e7d4f9a00e4783553284 Author: Andrei Zavada Date: Thu Sep 19 02:52:27 2013 +0300 set 'saved' profile field to false so it can be actually saved by save() --- upstream/src/aghermann/ui/dirlevel-storable-adapter.ii |1 + 1 file changed, 1 insertion(+) diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii index 2ef72e6..12c1125 100644 --- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii +++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii @@ -206,6 +206,7 @@ bXProfileSave_clicked_cb() P = Pp2; // except that it has new name and level P.name = this_name; P.level = this_level; +P.saved = false; populate_combo(); set_profile_manage_buttons_visibility(); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 28/85: SF: use SF.csubject() to get subject dir for saving montage svg
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit c14ee9a0cd587a3549167a25824221527dc41475 Author: Andrei Zavada Date: Sun Sep 15 02:11:50 2013 +0300 SF: use SF.csubject() to get subject dir for saving montage svg --- upstream/src/aghermann/ui/sf/montage_cb.cc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/montage_cb.cc b/upstream/src/aghermann/ui/sf/montage_cb.cc index ac1628c..dcf8310 100644 --- a/upstream/src/aghermann/ui/sf/montage_cb.cc +++ b/upstream/src/aghermann/ui/sf/montage_cb.cc @@ -886,7 +886,7 @@ iSFPageSaveChannelAsSVG_activate_cb( { auto& SF = *(SScoringFacility*)userdata; auto& ED = SF._p; -string j_dir = ED.ED->subject_dir( SF.using_channel->crecording.subject()); +string j_dir = ED.ED->subject_dir( SF.csubject()); string fname = sasprintf( "%s/%s/%s-p%zu@%zu.svg", j_dir.c_str(), ED.AghD(), ED.AghT(), SF.cur_vpage(), SF.vpagesize()); @@ -906,7 +906,7 @@ iSFPageSaveMontageAsSVG_activate_cb( { auto& SF = *(SScoringFacility*)userdata; auto& ED = SF._p; -string j_dir = ED.ED->subject_dir( SF.using_channel->crecording.subject()); +string j_dir = ED.ED->subject_dir( SF.csubject()); string fname = sasprintf( "%s/%s/montage-p%zu@%zu.svg", j_dir.c_str(), ED.AghD(), SF.cur_vpage(), SF.vpagesize()); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 34/85: variadic templates for the great good in load_profiles_from_location
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 4980849bfb3993995f6db27a21f89dd96ac99d6b Author: Andrei Zavada Date: Sun Sep 15 02:23:51 2013 +0300 variadic templates for the great good in load_profiles_from_location --- upstream/src/aghermann/expdesign/expdesign.hh |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghermann/expdesign/expdesign.hh index e1c0e15..a4ed10a 100644 --- a/upstream/src/aghermann/expdesign/expdesign.hh +++ b/upstream/src/aghermann/expdesign/expdesign.hh @@ -326,7 +326,10 @@ const char* CExpDesign::group_of( const T& jid) template list -load_profiles_from_location( agh::TExpDirLevel level, agh::CExpDesign& ED, const agh::SExpDirLevelId& level_id, +load_profiles_from_location( const string& subdir, + agh::TExpDirLevel level, + agh::CExpDesign& ED, + const agh::SExpDirLevelId& level_id, Args... args) { list ret; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 24/85: tree-scanner: make sure subject gets a name (use id if name missing)
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit f96203c1ed580ad5049c0ec7e69a0d5970fe50d2 Author: Andrei Zavada Date: Sun Sep 15 02:05:45 2013 +0300 tree-scanner: make sure subject gets a name (use id if name missing) --- upstream/src/aghermann/expdesign/tree-scanner.cc |6 ++ 1 file changed, 6 insertions(+) diff --git a/upstream/src/aghermann/expdesign/tree-scanner.cc b/upstream/src/aghermann/expdesign/tree-scanner.cc index d0f3511..8f02ab4 100644 --- a/upstream/src/aghermann/expdesign/tree-scanner.cc +++ b/upstream/src/aghermann/expdesign/tree-scanner.cc @@ -372,6 +372,12 @@ scan_tree( TMsmtCollectProgressIndicatorFun user_progress_fun) G.second.avg_episode_times[D][E] = avg_tm( tms[D][E]); } + + // name subjects for whom only id is known +for ( auto &G : groups ) +for ( auto &J : G.second ) + if ( J.name.empty() ) + J.name = J.id; } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 30/85: don't load profiles twice
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 0bf1657eeea6e8d403b1162959088769f8c187e2 Author: Andrei Zavada Date: Sun Sep 15 02:18:46 2013 +0300 don't load profiles twice --- upstream/src/aghermann/expdesign/expdesign.hh |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghermann/expdesign/expdesign.hh index 156a173..e1c0e15 100644 --- a/upstream/src/aghermann/expdesign/expdesign.hh +++ b/upstream/src/aghermann/expdesign/expdesign.hh @@ -346,7 +346,7 @@ load_profiles_from_location( agh::TExpDirLevel level, agh::CExpDesign& ED, const ret.emplace_back( eps[i]->d_name, level, ED, level_id, args...); -ret.back().load(); +// ret.back().load(); // loaded from ctor } catch (invalid_argument& ex) { ; } @@ -355,7 +355,6 @@ load_profiles_from_location( agh::TExpDirLevel level, agh::CExpDesign& ED, const free( (void*)eps); } -//printf("found %zu profiles in %s\n", ret.size(), agh::exp_dir_level_s(origin)); return move(ret); } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 35/85: load_profiles_from_location didn't correctly construct full path to profiles
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit c1b39a09de7b90a5246df1510a7dff2782e1 Author: Andrei Zavada Date: Sun Sep 15 02:24:53 2013 +0300 load_profiles_from_location didn't correctly construct full path to profiles --- upstream/src/aghermann/expdesign/expdesign.hh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/aghermann/expdesign/expdesign.hh b/upstream/src/aghermann/expdesign/expdesign.hh index a4ed10a..dda8066 100644 --- a/upstream/src/aghermann/expdesign/expdesign.hh +++ b/upstream/src/aghermann/expdesign/expdesign.hh @@ -334,7 +334,7 @@ load_profiles_from_location( const string& subdir, { list ret; -string location = ED.make_dirname( level, level_id); +string location = ED.make_dirname( level, level_id) + '/' + subdir; struct dirent **eps; int total = scandir( location.c_str(), &eps, simple_scandir_filter, alphasort); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 41/85: always load/save on show/hide of patters dialog
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit db4f29b580885f0fe2f332dbf3e19adc775832bc Author: Andrei Zavada Date: Sun Sep 15 02:35:36 2013 +0300 always load/save on show/hide of patters dialog --- upstream/src/aghermann/ui/sf/d/patterns_cb.cc |5 + 1 file changed, 5 insertions(+) diff --git a/upstream/src/aghermann/ui/sf/d/patterns_cb.cc b/upstream/src/aghermann/ui/sf/d/patterns_cb.cc index 96b6023..7c382a9 100644 --- a/upstream/src/aghermann/ui/sf/d/patterns_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/patterns_cb.cc @@ -459,6 +459,9 @@ wSFFD_show_cb( { auto& FD = *(SScoringFacility::SPatternsDialog*)userdata; +// new patterns may have appeared created by other SF instances, so +FD.load_patterns(); + FD.setup_controls_for_find(); FD.populate_combo(); FD.set_profile_manage_buttons_visibility(); @@ -492,6 +495,8 @@ wSFFD_hide_cb( SF.queue_redraw_all(); } } + +FD.save_patterns(); } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 36/85: routine enhancements in CStorablePPack
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 2435081104a0af9a8850c94471b9df19eb55d213 Author: Andrei Zavada Date: Sun Sep 15 02:25:58 2013 +0300 routine enhancements in CStorablePPack --- upstream/src/aghermann/expdesign/dirlevel.hh |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index d52c8bd..33fe23d 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -59,12 +59,18 @@ class CStorablePPack { level_id (level_id_), ED (ED_), saved (false) -{} +{} // don't load, defer until config_keys_* are connected + +CStorablePPack (const CStorablePPack&) = delete; // because of config_keys_* +CStorablePPack& operator=( const CStorablePPack&) = delete; // and because we cannot have identical profiles in tree string subdir, name; TExpDirLevel level; +const char* +exp_dir_level_s() const +{ return agh::exp_dir_level_s(level); } SExpDirLevelId level_id; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 73/85: painstaking dbl_cmp, feat. DBL_EPSILON
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 181469ff1197426dbf24550276cd7d63b7f20e84 Author: Andrei Zavada Date: Sun Sep 22 03:10:44 2013 +0300 painstaking dbl_cmp, feat. DBL_EPSILON --- upstream/src/common/lang.hh | 11 +++ upstream/src/libmetrics/mc-artifacts.hh | 24 +--- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/upstream/src/common/lang.hh b/upstream/src/common/lang.hh index ad71d85..89406ec 100644 --- a/upstream/src/common/lang.hh +++ b/upstream/src/common/lang.hh @@ -16,6 +16,8 @@ # include "config.h" #endif +#include +#include #include #include @@ -26,6 +28,15 @@ namespace agh { typedef unsigned long hash_t; +inline int dbl_cmp( double x, double y) __attribute__ ((pure)); +inline int dbl_cmp( double x, double y) +{ +if ( fabs(x - y) > DBL_EPSILON ) +return (x > y) ? 1 : -1; +else +return 0; +} + // g++ bits diff --git a/upstream/src/libmetrics/mc-artifacts.hh b/upstream/src/libmetrics/mc-artifacts.hh index f59afc6..7b1e3c8 100644 --- a/upstream/src/libmetrics/mc-artifacts.hh +++ b/upstream/src/libmetrics/mc-artifacts.hh @@ -15,6 +15,7 @@ #include #include +#include "common/lang.hh" #include "libsigproc/sigproc.hh" #include "aghermann/expdesign/dirlevel.hh" @@ -41,17 +42,18 @@ struct SArtifactDetectionPPack { bool operator==( const SArtifactDetectionPPack& rv) const { -return scope == rv.scope && -upper_thr == rv.upper_thr && -lower_thr == rv.lower_thr && -f0 == rv.f0 && -fc == rv.fc && -bandwidth == rv.bandwidth && -mc_gain == rv.mc_gain && -iir_backpolate == rv.iir_backpolate && -E == rv.E && -dmin == rv.dmin && -dmax == rv.dmax && +using agh::dbl_cmp; +return dbl_cmp(scope, rv.scope) == 0 && +dbl_cmp(upper_thr, rv.upper_thr) == 0 && +dbl_cmp(lower_thr, rv.lower_thr) == 0 && +dbl_cmp(f0, rv.f0) == 0 && +dbl_cmp(fc, rv.fc) == 0 && +dbl_cmp(bandwidth, rv.bandwidth) == 0 && +dbl_cmp(mc_gain, rv.mc_gain) == 0 && +dbl_cmp(iir_backpolate, rv.iir_backpolate) == 0 && +dbl_cmp(E, rv.E) == 0 && +dbl_cmp(dmin, rv.dmin) == 0 && +dbl_cmp(dmax, rv.dmax) == 0 && sssu_hist_size == rv.sssu_hist_size && smooth_side == rv.smooth_side && estimate_E == rv.estimate_E && -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 80/85: Cancel is so officialese, say Dismiss
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 05374bb9c5f34a49f9d05496cd5b2fb83579 Author: Andrei Zavada Date: Thu Sep 26 02:46:19 2013 +0300 Cancel is so officialese, say Dismiss --- upstream/data/sf-artifacts.glade |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/upstream/data/sf-artifacts.glade b/upstream/data/sf-artifacts.glade index 8a89dd9..ed350fd 100644 --- a/upstream/data/sf-artifacts.glade +++ b/upstream/data/sf-artifacts.glade @@ -103,17 +103,17 @@ False end - -gtk-cancel + +Dismiss True True True -True False True 0 +True @@ -941,6 +941,7 @@ True False +end 5 @@ -1066,7 +1067,7 @@ - bSFADCancel + bSFADDismiss bSFADPreview bSFADApply -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 56/85: eX_any_profile_value_changed_cb belongs to a base class, too
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit f031900219b10853f925ad6265d4852adaa25725 Author: Andrei Zavada Date: Sat Sep 21 01:07:40 2013 +0300 eX_any_profile_value_changed_cb belongs to a base class, too --- .../src/aghermann/ui/dirlevel-storable-adapter.hh |1 + .../src/aghermann/ui/dirlevel-storable-adapter.ii | 17 + upstream/src/aghermann/ui/sf/d/patterns.hh|3 +++ upstream/src/aghermann/ui/sf/d/rk1968.cc |6 ++ upstream/src/aghermann/ui/sf/d/rk1968.hh |1 + upstream/src/aghermann/ui/sf/d/rk1968_cb.cc | 10 ++ 6 files changed, 38 insertions(+) diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.hh b/upstream/src/aghermann/ui/dirlevel-storable-adapter.hh index d555801..4ed50ae 100644 --- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.hh +++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.hh @@ -92,6 +92,7 @@ class SDirlevelStorableAdapter { void bXProfileSave_clicked_cb(); void bXProfileDiscard_clicked_cb(); void bXProfileRevert_clicked_cb(); +void eX_any_profile_value_changed_cb(); void eXProfileSaveName_changed_cb(); void eX_any_profile_origin_toggled_cb(); diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii index 23a13fe..5e0f731 100644 --- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii +++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii @@ -174,6 +174,23 @@ eXProfileList_changed_cb() + + +template +void +SDirlevelStorableAdapter:: +eX_any_profile_value_changed_cb() +{ +if ( suppress_w_v ) +return; + +W_V.down(); + +set_profile_manage_buttons_visibility(); +} + + + template void SDirlevelStorableAdapter:: diff --git a/upstream/src/aghermann/ui/sf/d/patterns.hh b/upstream/src/aghermann/ui/sf/d/patterns.hh index 529873a..ee41e16 100644 --- a/upstream/src/aghermann/ui/sf/d/patterns.hh +++ b/upstream/src/aghermann/ui/sf/d/patterns.hh @@ -186,6 +186,9 @@ gboolean daSFFDThing_scroll_event_cb( GtkWidget*, GdkEventScroll*, gpointer); void bSFFDSearch_clicked_cb( GtkButton*, gpointer); void bSFFDAgain_clicked_cb( GtkButton*, gpointer); +void eSFFD_any_profile_value_changed_cb( GtkSpinButton*, gpointer); +void eSFFD_any_criteria_value_changed_cb( GtkSpinButton*, gpointer); + gboolean eSFFD_any_criteria_focus_in_event_cb(GtkWidget*, GdkEvent*, gpointer); gboolean wSFFD_configure_event_cb( GtkWidget*, GdkEventConfigure*, gpointer); void iSFFDFieldDrawMatchIndex_toggled_cb( GtkCheckMenuItem*, gpointer); diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.cc b/upstream/src/aghermann/ui/sf/d/rk1968.cc index fd506d0..7053124 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968.cc @@ -75,6 +75,12 @@ SRK1968Dialog (SScoringFacility& p_) G_CONNECT_1 (bSFRKProfileRevert, clicked); G_CONNECT_1 (bSFRKProfileDiscard, clicked); +for ( auto& W : {eSFRKNremThetaDeltaRatio} ) +g_signal_connect( +W, "value-changed", +(GCallback)eSFRK_any_profile_value_changed_cb, +this); + G_CONNECT_1 (bSFRKTry,clicked); G_CONNECT_1 (bSFRKModify, clicked); diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.hh b/upstream/src/aghermann/ui/sf/d/rk1968.hh index 1f3f187..5aab52b 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.hh +++ b/upstream/src/aghermann/ui/sf/d/rk1968.hh @@ -92,6 +92,7 @@ void wSFRK_show_cb( GtkWidget*, gpointer); void wSFRK_hide_cb( GtkWidget*, gpointer); gboolean wSFRK_configure_event_cb( GtkWidget*, GdkEventConfigure*, gpointer); +void eSFRK_any_profile_value_changed_cb( GtkSpinButton*, gpointer); void bSFRKTry_clicked_cb( GtkButton*, gpointer); void bSFRKModify_clicked_cb( GtkButton*, gpointer); diff --git a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc index e147d57..01918af 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc @@ -58,6 +58,16 @@ wSFRK_hide_cb( } void +eSFRK_any_profile_value_changed_cb( +GtkSpinButton* button, +const gpointer userdata) +{ +auto& RK = *(SScoringFacility::SRK1968Dialog*)userdata; +RK.eX_any_profile_value_changed_cb(); +} + + +void bSFRKTry_clicked_cb( GtkButton*, gpointer userdata) -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 77/85: rename some
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 017233654acd526f0fdb68ae54f625eff28d943e Author: Andrei Zavada Date: Tue Sep 24 23:56:32 2013 +0300 rename some --- upstream/src/aghermann/ui/mf/Makefile.am |2 +- .../ui/mf/{mf-construct.cc => construct.cc}| 50 +++- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/upstream/src/aghermann/ui/mf/Makefile.am b/upstream/src/aghermann/ui/mf/Makefile.am index 6a5fe89..6135a64 100644 --- a/upstream/src/aghermann/ui/mf/Makefile.am +++ b/upstream/src/aghermann/ui/mf/Makefile.am @@ -8,7 +8,7 @@ AM_CXXFLAGS := \ noinst_LIBRARIES := liba.a liba_a_SOURCES := \ - mf-construct.cc \ + construct.cc \ mf.cc \ mf.hh \ mf_cb.cc \ diff --git a/upstream/src/aghermann/ui/mf/mf-construct.cc b/upstream/src/aghermann/ui/mf/construct.cc similarity index 63% rename from upstream/src/aghermann/ui/mf/mf-construct.cc rename to upstream/src/aghermann/ui/mf/construct.cc index e62580b..8a806c6 100644 --- a/upstream/src/aghermann/ui/mf/mf-construct.cc +++ b/upstream/src/aghermann/ui/mf/construct.cc @@ -53,30 +53,34 @@ construct_widgets() G_CONNECT_1 (eMFAZ1, toggled); G_CONNECT_1 (eMFAZ2, toggled); -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVrs" )] = agh::ach::TTunable::rs ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVrc" )] = agh::ach::TTunable::rc ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVfcR")] = agh::ach::TTunable::fcR; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVfcW")] = agh::ach::TTunable::fcW; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVS0" )] = agh::ach::TTunable::S0 ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVSU" )] = agh::ach::TTunable::SU ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVta" )] = agh::ach::TTunable::ta ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVtp" )] = agh::ach::TTunable::tp ; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVgc1")] = agh::ach::TTunable::gc1; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVgc2")] = agh::ach::TTunable::gc2; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVgc3")] = agh::ach::TTunable::gc3; -eMFVx[(GtkSpinButton*)gtk_builder_get_object( builder, "eMFVgc4")] = agh::ach::TTunable::gc4; -for ( auto &tuple : eMFVx ) -if ( tuple.first == nullptr ) -return -1; +for ( auto& T : forward_list> +{ {"eMFVrs", agh::ach::TTunable::rs }, + {"eMFVrc", agh::ach::TTunable::rc }, + {"eMFVfcR", agh::ach::TTunable::fcR}, + {"eMFVfcW", agh::ach::TTunable::fcW}, + {"eMFVS0", agh::ach::TTunable::S0 }, + {"eMFVSU", agh::ach::TTunable::SU }, + {"eMFVta", agh::ach::TTunable::ta }, + {"eMFVtp", agh::ach::TTunable::tp }, + {"eMFVgc1", agh::ach::TTunable::gc1}, + {"eMFVgc2", agh::ach::TTunable::gc2}, + {"eMFVgc3", agh::ach::TTunable::gc3}, + {"eMFVgc4", agh::ach::TTunable::gc4}} ) { +auto W = (GtkSpinButton*)gtk_builder_get_object( builder, T.first); +if ( W ) { +eMFVx[W] = T.second; +g_signal_connect( +W, "value-changed", +(GCallback)eMFVx_value_changed_cb, +this); +} else +throw runtime_error (string("Missing widget: ") + T.first); +} + if ( not csimulation.ctl_params.AZAmendment1 ) // disable gcx unless AZAmendment is in effect -for ( auto &tuple : eMFVx ) -if ( tuple.second > agh::ach::TTunable::gc ) -gtk_widget_set_sensitive( (GtkWidget*)tuple.first, FALSE); - -for ( auto &tuple : eMFVx ) -g_signal_connect( tuple.first, "value-changed", - (GCallback)eMFVx_value_changed_cb, - this); +for ( auto &T : eMFVx ) +if ( T.second > agh::ach::TTunable::gc ) +gtk_widget_set_sensitive( (GtkWidget*)T.first, FALSE); g_object_set( (GObject*)lMFLog, -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/
[med-svn] [aghermann] 72/85: addendum to 291c2ec5950845
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 4318e63ec90694a2bb66477d99f8e9369de70d4c Author: Andrei Zavada Date: Sun Sep 22 03:09:37 2013 +0300 addendum to 291c2ec5950845 --- upstream/src/aghermann/ui/sf/d/artifacts.cc| 10 -- upstream/src/aghermann/ui/sf/d/artifacts.hh|1 - upstream/src/aghermann/ui/sf/d/artifacts_cb.cc |4 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/d/artifacts.cc b/upstream/src/aghermann/ui/sf/d/artifacts.cc index 66506d5..d08540b 100644 --- a/upstream/src/aghermann/ui/sf/d/artifacts.cc +++ b/upstream/src/aghermann/ui/sf/d/artifacts.cc @@ -98,11 +98,17 @@ SArtifactsDialog (SScoringFacility& p_) for ( auto& W : {eSFADUpperThr, eSFADLowerThr, eSFADScope, eSFADF0, eSFADFc, eSFADBandwidth, eSFADMCGain, eSFADBackpolate, eSFADEValue, -eSFADHistRangeMin, eSFADHistRangeMax, eSFADHistBins, eSFADSmoothSide} ) + eSFADHistRangeMin, eSFADHistRangeMax, eSFADHistBins, eSFADSmoothSide} ) g_signal_connect( W, "value-changed", (GCallback)eSFAD_any_profile_value_changed_cb, this); +// for ( auto& W : {eSFADEstimateE, eSFADSingleChannelPreview} ) +// g_signal_connect( +// W, "toggled", +// (GCallback)eSFAD_any_profile_value_toggled_cb, +// this); +/// use available *_toggled_cb for these checkbuttons G_CONNECT_1 (eSFADEstimateE, toggled); G_CONNECT_1 (eSFADUseThisRange, toggled); @@ -132,7 +138,7 @@ SArtifactsDialog (SScoringFacility& p_) W_V.reg( eSFADHistRangeMax, &P.dmax); W_V.reg( eSFADHistBins, (int*)&P.sssu_hist_size); W_V.reg( eSFADSmoothSide, (int*)&P.smooth_side); -W_V.reg( eSFADUseThisRange, &P.use_range); +W_V.reg( (GtkCheckButton*)eSFADUseThisRange, &P.use_range); atomic_up(); } diff --git a/upstream/src/aghermann/ui/sf/d/artifacts.hh b/upstream/src/aghermann/ui/sf/d/artifacts.hh index e254618..7cda6e5 100644 --- a/upstream/src/aghermann/ui/sf/d/artifacts.hh +++ b/upstream/src/aghermann/ui/sf/d/artifacts.hh @@ -123,7 +123,6 @@ void bSFADProfileRevert_clicked_cb( GtkButton*, gpointer); void bSFADProfileDiscard_clicked_cb( GtkButton*, gpointer); void eSFAD_any_profile_value_changed_cb( GtkSpinButton*, gpointer); -void eSFAD_any_criteria_value_changed_cb( GtkSpinButton*, gpointer); void eSFAD_any_profile_origin_toggled_cb(GtkRadioButton*, gpointer); void eSFADEstimateE_toggled_cb( GtkToggleButton*, gpointer); diff --git a/upstream/src/aghermann/ui/sf/d/artifacts_cb.cc b/upstream/src/aghermann/ui/sf/d/artifacts_cb.cc index 23f7d60..fffb6ae 100644 --- a/upstream/src/aghermann/ui/sf/d/artifacts_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/artifacts_cb.cc @@ -101,6 +101,8 @@ eSFADEstimateE_toggled_cb( gtk_widget_set_visible( (GtkWidget*)AD.cSFADWhenEstimateEOff, !state); + +AD.eX_any_profile_value_changed_cb(); } void @@ -117,6 +119,8 @@ eSFADUseThisRange_toggled_cb( gtk_widget_set_sensitive( (GtkWidget*)AD.eSFADHistRangeMax, state); + +AD.eX_any_profile_value_changed_cb(); } void -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 79/85: WIP on sf/d/rk1968
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 8941b6b78f36460e60f534f09de769abd1ff2c29 Author: Andrei Zavada Date: Thu Sep 26 02:45:31 2013 +0300 WIP on sf/d/rk1968 --- upstream/data/sf-rk1968.glade | 72 +++ upstream/src/aghermann/ui/sf/d/rk1968.cc|9 ++-- upstream/src/aghermann/ui/sf/d/rk1968.hh| 16 +++--- upstream/src/aghermann/ui/sf/d/rk1968_cb.cc | 31 ++-- 4 files changed, 58 insertions(+), 70 deletions(-) diff --git a/upstream/data/sf-rk1968.glade b/upstream/data/sf-rk1968.glade index 8cdcb1c..efb42f6 100644 --- a/upstream/data/sf-rk1968.glade +++ b/upstream/data/sf-rk1968.glade @@ -48,57 +48,25 @@ - + +Preview +True +True +True + + +False +True +1 + - + +gtk-apply True -False -vertical -True - - -Try -True -True -True - - -False -True -0 - - - - -True -False -center -1 -Working … - - - - - -False -True -1 - - - - -Modify -True -True -True - - -False -True -2 - - +True +True +True False @@ -259,12 +227,6 @@ - - - - - - True True @@ -328,6 +290,8 @@ bSFRKDismiss + bSFRKPreview + bSFRKApply diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.cc b/upstream/src/aghermann/ui/sf/d/rk1968.cc index 93f4f16..b1fa1b9 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968.cc @@ -47,9 +47,8 @@ SRK1968Dialog (SScoringFacility& p_) AGH_GBGETOBJ (bSFRKProfileDiscard); AGH_GBGETOBJ (eSFRKProfileList); AGH_GBGETOBJ (eSFRKNremThetaDeltaRatio); -AGH_GBGETOBJ (bSFRKTry); -AGH_GBGETOBJ (bSFRKModify); -AGH_GBGETOBJ (lSFRKWorking); +AGH_GBGETOBJ (bSFRKPreview); +AGH_GBGETOBJ (bSFRKApply); AGH_GBGETOBJ (wSFRKProfileSave); AGH_GBGETOBJ (eSFRKProfileSaveName); AGH_GBGETOBJ (eSFRKProfileSaveOriginSubject); @@ -78,8 +77,8 @@ SRK1968Dialog (SScoringFacility& p_) (GCallback)eSFRK_any_profile_value_changed_cb, this); -G_CONNECT_1 (bSFRKTry,clicked); -G_CONNECT_1 (bSFRKModify, clicked); +G_CONNECT_1 (bSFRKPreview, toggled); +G_CONNECT_1 (bSFRKApply, clicked); G_CONNECT_1 (eSFRKProfileSaveName, changed); diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.hh b/upstream/src/aghermann/ui/sf/d/rk1968.hh index e72d18e..f0e54c3 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.hh +++ b/upstream/src/aghermann/ui/sf/d/rk1968.hh @@ -12,6 +12,7 @@ #ifndef AGH_AGHERMANN_UI_SF_D_RK1968_H_ #define AGH_AGHERMANN_UI_SF_D_RK1968_H_ +#include "libsigfile/page.hh" #include "aghermann/rk1968/rk1968.hh" #include "aghermann/ui/ui++.hh" #include "aghermann/ui/dirlevel-storable-adapter.hh" @@ -35,6 +36,9 @@ struct SScoringFacility::SRK1968Dialog explicit SRK1968Dialog (SScoringFacility&); ~SRK1968Dialog (); +vector +backup; + // parent SScoringFacility& _p; @@ -59,11 +63,10 @@ struct SScoringFacility::SRK1968Dialog GtkSpinButton *eSFRKNremThetaDeltaRatio; +GtkToggleButton +*bSFRKPreview; GtkButton -*bSFRKTry, -*bSFRKModify; -GtkLabel -*lSFRKWorking; +*bSFRKApply; GtkDial
[med-svn] [aghermann] 84/85: RK1968 essential WIP
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 26b713d74fc0c53c390020ea337b94cf65b5ffbe Author: Andrei Zavada Date: Fri Sep 27 02:43:44 2013 +0300 RK1968 essential WIP --- upstream/ChangeLog |2 + upstream/data/sf-rk1968.glade | 119 +--- upstream/src/aghermann/rk1968/rk1968.cc| 17 ++- upstream/src/aghermann/rk1968/rk1968.hh|2 +- .../src/aghermann/ui/dirlevel-storable-adapter.ii | 26 - upstream/src/aghermann/ui/sf/d/rk1968.cc |5 + upstream/src/aghermann/ui/sf/d/rk1968.hh |7 ++ upstream/src/aghermann/ui/sf/d/rk1968_cb.cc| 77 +++-- upstream/src/aghermann/ui/sf/sf.cc |8 +- upstream/src/aghermann/ui/sf/sf.hh |3 +- 10 files changed, 184 insertions(+), 82 deletions(-) diff --git a/upstream/ChangeLog b/upstream/ChangeLog index 7c364d5..1685d92 100644 --- a/upstream/ChangeLog +++ b/upstream/ChangeLog @@ -8,6 +8,8 @@ v.0.9.2 (2013-xx-xx) * Use subject ID in place of name if the latter is missing. * Properly handle various system/user/experiment/subject/session stored settings packs (patterns, rk1968, etc). + * Incorporate edfhed.glade in aghermann.gresources. + * SF: basic dialog for RK1968 scoring assistant parameters. v.0.9.1.1 (2013-07-24) * Fix 32-bit builds where sizeof(size_t) != sizeof(unsigned long). diff --git a/upstream/data/sf-rk1968.glade b/upstream/data/sf-rk1968.glade index efb42f6..e060e98 100644 --- a/upstream/data/sf-rk1968.glade +++ b/upstream/data/sf-rk1968.glade @@ -11,7 +11,7 @@ False 10 -Find/manage patterns +Rechtschaffen & Kales True normal True @@ -19,7 +19,6 @@ north - True @@ -49,7 +48,7 @@ -Preview +Try True True True @@ -94,16 +93,12 @@ 5 5 - + True False 0 -5 -Rechtschaffen & Kales - - - - +RK (n channels) +True True @@ -196,68 +191,52 @@ - + True False -5 -8 +2 +2 +5 + + + + + + + + + + + + + + + + + + - + True -False -2 -2 -5 - - - - - - - - - - - - - - - - - - - - -True -True -• -1 -jSFRKNremThetaDeltaRatio -2 - - -1 -2 - - - - -True -False -1 -NREM Delta/Theta power ratio: - - +True +• +1 +jSFRKNremThetaDeltaRatio +2 -False -True -2 -0 +1 +2 +GTK_FILL - + +True +False +1 +NREM Delta/Theta power ratio: +
[med-svn] [aghermann] 83/85: whitespace, code comments
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a0e739da989fae30dc85f1bd338d4739240ba1e7 Author: Andrei Zavada Date: Fri Sep 27 00:22:02 2013 +0300 whitespace, code comments --- .../src/aghermann/ui/dirlevel-storable-adapter.ii |4 ++-- upstream/src/libmetrics/mc-artifacts.cc|2 ++ upstream/src/libmetrics/page-metrics-base.hh | 20 ++-- upstream/src/libmetrics/psd.hh |2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii index 5e0f731..f7d1f47 100644 --- a/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii +++ b/upstream/src/aghermann/ui/dirlevel-storable-adapter.ii @@ -143,8 +143,8 @@ set_profile_manage_buttons_visibility() boolhave_active = current_profile != profiles.end(), is_transient = have_active && current_profile->level == agh::TExpDirLevel::transient, is_modified = have_active && not (*current_profile == Pp2); -printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1); -printf( "%s\n-vs-\n%s\n", have_active ? current_profile->serialize().c_str() : "??", Pp2.serialize().c_str()); +// printf( "active %d %s %d\n", have_active, have_active ? agh::exp_dir_level_s(current_profile->level) : "-", have_active ? not (*current_profile == Pp2) : -1); +// printf( "%s\n-vs-\n%s\n", have_active ? current_profile->serialize().c_str() : "??", Pp2.serialize().c_str()); gtk_widget_set_visible( (GtkWidget*)bXProfileSave, have_active); gtk_widget_set_visible( (GtkWidget*)bXProfileRevert, have_active and not is_transient and is_modified); gtk_widget_set_visible( (GtkWidget*)bXProfileDiscard, have_active and not is_transient); diff --git a/upstream/src/libmetrics/mc-artifacts.cc b/upstream/src/libmetrics/mc-artifacts.cc index 75eaed7..48d549f 100644 --- a/upstream/src/libmetrics/mc-artifacts.cc +++ b/upstream/src/libmetrics/mc-artifacts.cc @@ -55,9 +55,11 @@ estimate_E( const valarray& S, return estimate_E( agh::alg::to_vad(S), bins, dmin, dmax); } + } // namespace mc } // namespace metrics + // Local Variables: // Mode: c++ // indent-tabs-mode: 8 diff --git a/upstream/src/libmetrics/page-metrics-base.hh b/upstream/src/libmetrics/page-metrics-base.hh index 8d71ae8..7b4c6b3 100644 --- a/upstream/src/libmetrics/page-metrics-base.hh +++ b/upstream/src/libmetrics/page-metrics-base.hh @@ -84,24 +84,24 @@ class CProfile { double pagesize, double step, size_t bins); CProfile (const CProfile&) = default; public: -SPPack Pp; +SPPack Pp; virtual const char* metric_name() const = 0; const sigfile::CSource& - source() const +source() const { return _using_F(); } int - sig_no() const +sig_no() const { return _using_sig_no; } bool - have_data() const +have_data() const { return _status & TFlags::computed; } size_t - bins() const +bins() const { return _bins; } size_t steps() const; // overlapping pages @@ -126,16 +126,16 @@ class CProfile { // power course // full (note the returned array size is length * n_bins) valarray - course() const +course() const { return _data; } // in a bin valarray - course( size_t m) const +course( size_t m) const { return _data[ slice(m, steps(), _bins) ]; } valarray - spectrum( size_t p) const +spectrum( size_t p) const { return _data[ slice(p * _bins, _bins, 1) ]; } @@ -164,11 +164,11 @@ class CProfile { computed = (1<<0), computable = (1<<1) }; -int_status; +int _status; valarray // arrays in a given bin extracted by slices _data;// it is always double because it is saved/loaded in this form -size_t _bins; +size_t _bins; agh::hash_t _signature_when_mirrored; diff --git a/upstream/src/libmetrics/psd.hh b/upstream/src/libmetrics/psd.hh index 90612d3..dbeb08d 100644 --- a/upstream/src/libmetrics/psd.hh +++ b/upstream/src/libmetrics/psd.hh @@ -65,7 +65,7 @@ plan_type( int f) struct SPPack : public metrics::SPPack { -doublebinsize; +double binsize; static sigproc::TWinType welch_window_type; static TFFTWPlanType -- Alioth's /git/debian-med/git-commit-notice on /srv/git.deb
[med-svn] [aghermann] 45/85: Create README.md
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 65b964b2b41175b378a600c97868507754cfd439 Author: Andrei Zavada Date: Wed Sep 18 18:42:20 2013 +0300 Create README.md --- README.md |2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md new file mode 100644 index 000..c67b83b --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +Documentation is maintained online. Please refer to +http://johnhommer.com/academic/code/aghermann. -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 78/85: whitespace; prefer const string& type for a fname arg; rename CHypnogram::{->n_}pages
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit d9dd2c6fccdc55b69c2fad98634471fac7b21168 Author: Andrei Zavada Date: Thu Sep 26 02:44:23 2013 +0300 whitespace; prefer const string& type for a fname arg; rename CHypnogram::{->n_}pages --- upstream/src/aghermann/expdesign/recording.cc | 10 +++--- upstream/src/aghermann/rk1968/rk1968.cc |4 +-- upstream/src/aghermann/ui/sf/hypnogram.cc |2 +- upstream/src/aghermann/ui/sf/sf.cc| 35 ++- upstream/src/libsigfile/page.cc | 44 +--- upstream/src/libsigfile/page.hh | 45 - upstream/src/libsigfile/typed-source.cc |6 ++-- 7 files changed, 75 insertions(+), 71 deletions(-) diff --git a/upstream/src/aghermann/expdesign/recording.cc b/upstream/src/aghermann/expdesign/recording.cc index be4c0ab..ac36ac3 100644 --- a/upstream/src/aghermann/expdesign/recording.cc +++ b/upstream/src/aghermann/expdesign/recording.cc @@ -118,14 +118,14 @@ CProfile (CSubject& J, const string& d, const sigfile::SChannel& h, return; // this is really serious, so return now } -intpa = (size_t)difftime( F.start_time(), _0at) / _pagesize, -//pz = (size_t)difftime( F.end_time(), _0at) / _pagesize; -pz = pa + M.hypnogram().pages(); +int pa = (size_t)difftime( F.start_time(), _0at) / _pagesize, +//pz = (size_t)difftime( F.end_time(), _0at) / _pagesize; +pz = pa + M.hypnogram().n_pages(); // anchor zero page, get pagesize from edf^W CBinnedPower^W either goes time_t dima = F.start_time(); printf( "CProfile::CProfile(): adding %s of [%s, %s, %s] %zu pages (%zu full, %zu in hypnogram) recorded %s", metrics::name(params.metric), F.subject().id.c_str(), F.session(), F.episode(), -M.total_pages(), M.full_pages(), M.hypnogram().pages(), ctime( &dima)); +M.total_pages(), M.full_pages(), M.hypnogram().n_pages(), ctime( &dima)); if ( pz - pa != (int)M.full_pages() ) { fprintf( stderr, "CProfile::CProfile(): correcting end page to match full page count in EDF: %d->%zu\n", @@ -180,7 +180,7 @@ CProfile (CRecording& M, time_t dima = M.F().start_time(); printf( "CProfile::CProfile(): adding single recording %s of [%s, %s, %s] %zu pages (%zu full, %zu in hypnogram) recorded %s", metrics::name(params.metric), M.F().subject().id.c_str(), M.F().session(), M.F().episode(), -M.total_pages(), M.full_pages(), M.hypnogram().pages(), ctime( &dima)); +M.total_pages(), M.full_pages(), M.hypnogram().n_pages(), ctime( &dima)); if ( pz - pa != (int)M.full_pages() ) { fprintf( stderr, "CProfile::CProfile(): correcting end page to match full page count in EDF: %d->%zu\n", diff --git a/upstream/src/aghermann/rk1968/rk1968.cc b/upstream/src/aghermann/rk1968/rk1968.cc index 43fb53f..26e49d3 100644 --- a/upstream/src/aghermann/rk1968/rk1968.cc +++ b/upstream/src/aghermann/rk1968/rk1968.cc @@ -64,8 +64,8 @@ score( agh::SEpisode& E) } auto& firstsource = E.sources.front(); -for ( size_t p = 0; p < firstsource.pages(); ++p ) { -autoDi = courses_delta.begin(), +for ( size_t p = 0; p < firstsource.n_pages(); ++p ) { +autoDi = courses_delta.begin(), Ti = courses_theta.begin(); int decision = 0; for ( ; Di != courses_delta.end(); ++Di, ++Ti ) diff --git a/upstream/src/aghermann/ui/sf/hypnogram.cc b/upstream/src/aghermann/ui/sf/hypnogram.cc index e7ec6a6..e4f51c1 100644 --- a/upstream/src/aghermann/ui/sf/hypnogram.cc +++ b/upstream/src/aghermann/ui/sf/hypnogram.cc @@ -146,7 +146,7 @@ do_dialog_import_hypnogram() size_t c = 0; while ( not getline(f, t).eof() ) ++c; -size_t our_pages = sepisode().sources.front().pages(); +size_t our_pages = sepisode().sources.front().n_pages(); if ( c != our_pages && // allow for last page scored but discarded in CHypnogram as incomplete c != our_pages+1 ) pop_ok_message( diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index 47cd356..e7e25f1 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -460,8 +460,8 @@ get_hypnogram() // just get from the first source, // trust other sources are no different auto &F
[med-svn] [aghermann] 75/85: improve confval::
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 2c88ee2183b4e22deb3fbd42c72bb6cf504bbbf2 Author: Andrei Zavada Date: Mon Sep 23 02:10:55 2013 +0300 improve confval:: --- upstream/src/aghermann/expdesign/dirlevel.cc | 27 ++--- upstream/src/aghermann/expdesign/dirlevel.hh |7 +-- upstream/src/aghermann/expdesign/expdesign.cc | 74 +++-- upstream/src/aghermann/expdesign/expdesign.hh |7 +-- upstream/src/aghermann/expdesign/loadsave.cc | 26 +++-- upstream/src/aghermann/patterns/patterns.cc | 27 - upstream/src/aghermann/rk1968/rk1968.cc |5 +- upstream/src/aghermann/ui/mw/loadsave.cc | 12 +--- upstream/src/aghermann/ui/mw/mw.cc| 64 ++--- upstream/src/aghermann/ui/mw/mw.hh| 13 ++--- upstream/src/aghermann/ui/sf/channel.cc | 59 ++-- upstream/src/aghermann/ui/sf/channel.hh |5 +- upstream/src/aghermann/ui/sf/d/artifacts.cc | 37 ++--- upstream/src/aghermann/ui/sf/sf.cc| 40 + upstream/src/aghermann/ui/sf/sf.hh|5 +- upstream/src/common/config-validate.hh| 55 +++--- 16 files changed, 213 insertions(+), 250 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index d4b624d..8eaae66 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -80,18 +80,11 @@ int CStorablePPack:: load() { -libconfig::Config conf; +libconfig::Config C; try { -conf.readFile( path().c_str()); - -using namespace confval; -get( config_keys_d, conf); -get( config_keys_z, conf); -get( config_keys_g, conf); -get( config_keys_b, conf); -get( config_keys_s, conf); - +C.readFile( path().c_str()); +config.get( C); saved = true; return 0; @@ -116,17 +109,9 @@ save() } try { -libconfig::Config conf; - -using namespace confval; -put( config_keys_d, conf); -put( config_keys_g, conf); -put( config_keys_b, conf); -put( config_keys_s, conf); -put( config_keys_z, conf); - -conf.writeFile( p.c_str()); - +libconfig::Config C; +config.put( C); +C.writeFile( p.c_str()); saved = true; return 0; diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index 68a3866..e7b01cc 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -109,11 +109,8 @@ class CStorablePPack { { saved = false; } protected: -forward_list>config_keys_g; -forward_list> config_keys_d; -forward_list>config_keys_z; -forward_list> config_keys_b; -forward_list>config_keys_s; +agh::confval::CConfigKeys +config; }; diff --git a/upstream/src/aghermann/expdesign/expdesign.cc b/upstream/src/aghermann/expdesign/expdesign.cc index b62033a..4a3779d 100644 --- a/upstream/src/aghermann/expdesign/expdesign.cc +++ b/upstream/src/aghermann/expdesign/expdesign.cc @@ -51,48 +51,40 @@ CExpDesign (const string& session_dir_, af_dampen_factor (.95), tunables0 (tstep, tlo, thi), // only references here, don't worry strict_subject_id_checks (false), -_id_pool (0), -config_keys_g ({ -SValidator("ctl_param.step_size", &ctl_params0.siman_params.step_size), -SValidator("ctl_param.boltzmann_k", &ctl_params0.siman_params.k,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.t_initial", &ctl_params0.siman_params.t_initial,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.damping_mu", &ctl_params0.siman_params.mu_t, SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("ctl_param.t_min", &ctl_params0.siman_params.t_min,SValidator::SVFRangeEx( DBL_MIN, 1e9)), -SValidator("profile.req_scored_pc", &profile_common_params0.req_percent_scored, SValidator::SVFRangeIn( 80., 100.)), -SValidator("fft_param.pagesize", &fft_params.pagesize, SValidator::SVFRangeIn( 4., 120.)), -SValidator("fft_param.binsize", &fft_params.binsize,
[med-svn] [aghermann] 64/85: size-group for profile mgmt buttons
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 8351c4f934bf0be1782eddb03f59f0b0eeb0622e Author: Andrei Zavada Date: Sat Sep 21 14:51:56 2013 +0300 size-group for profile mgmt buttons --- upstream/data/sf-artifacts.glade |7 ++ upstream/data/sf-patterns.glade | 159 +- upstream/data/sf-rk1968.glade| 24 -- 3 files changed, 110 insertions(+), 80 deletions(-) diff --git a/upstream/data/sf-artifacts.glade b/upstream/data/sf-artifacts.glade index b1470e9..c04e12b 100644 --- a/upstream/data/sf-artifacts.glade +++ b/upstream/data/sf-artifacts.glade @@ -1178,4 +1178,11 @@ + + + + + + + diff --git a/upstream/data/sf-patterns.glade b/upstream/data/sf-patterns.glade index 3b4dc57..718841f 100644 --- a/upstream/data/sf-patterns.glade +++ b/upstream/data/sf-patterns.glade @@ -1,72 +1,6 @@ - -50 -1.5 -0.25 -1 - - -0.01 -100 -0.10001 -0.01 -1 - - -0.01 -100 -0.10001 -0.01 -1 - - -0.01 -100 -0.10001 -0.01003501772881 -1 - - -0.01 -2 -0.10001 -0.01 -0.10001 - - -0.01 -10 -0.01 -10 - - -12 -1 -1 -3 - - -0.10001 -5 -0.10001 -10 - - -0.050003 -20 -0.25 -0.01 -5 - - -0.01 -0.5 -0.050003 -0.01 -0.10001 - True False @@ -153,6 +87,72 @@ 1 10 + +50 +1.5 +0.25 +1 + + +0.01 +100 +0.10001 +0.01 +1 + + +0.01 +100 +0.10001 +0.01 +1 + + +0.01 +100 +0.10001 +0.01003501772881 +1 + + +0.01 +2 +0.10001 +0.01 +0.10001 + + +0.01 +10 +0.01 +10 + + +12 +1 +1 +3 + + +0.10001 +5 +0.10001 +10 + + +0.050003 +20 +0.25 +0.01 +5 + + +0.01 +0.5 +0.050003 +0.01 +0.10001 + True False @@ -457,24 +457,24 @@ True False +5 - + +Revert True -False +True +True False True -end 0 - -Revert + True -True -True +False False @@ -1240,6 +1240,12 @@ on individual parameters + + + + + + 1 @@ -1603,4 +1609,11 @@ on individual parameters + + + + + + + diff --git a/upstream/data/sf-rk1968.glade b/upstream/data/sf-rk1968.glade index fedafaa..8cdcb1c 100644 --- a/upstream/data/sf-rk1968.glade +++ b/upstream/data/sf-rk1968.glade @@ -147,24 +147,24 @@ True False +5 - + +Revert True -False +True +True False True -end 0 - -Revert + True -True -True +False False @@ -262,6 +262,9 @@ + + + True
[med-svn] [aghermann] 71/85: addendum to 291c2ec59508
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit ad0311bf08306943cf493eec2b443427305fa24d Author: Andrei Zavada Date: Sun Sep 22 02:01:52 2013 +0300 addendum to 291c2ec59508 --- upstream/src/aghermann/ui/mw/populate.cc |2 -- 1 file changed, 2 deletions(-) diff --git a/upstream/src/aghermann/ui/mw/populate.cc b/upstream/src/aghermann/ui/mw/populate.cc index 35c7156..6f111f8 100644 --- a/upstream/src/aghermann/ui/mw/populate.cc +++ b/upstream/src/aghermann/ui/mw/populate.cc @@ -97,8 +97,6 @@ populate( bool do_load) populate_mGlobalAnnotations(); populate_1(); -gtk_combo_box_set_active( eGlobalADProfiles, 0); - switch ( display_profile_type ) { case metrics::TType::psd: gtk_combo_box_set_active( eMsmtProfileType, 0); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 68/85: fixes in rk1968 profile handling
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit d94b560d78d726cbbe40a104a0dd14ee938b8826 Author: Andrei Zavada Date: Sun Sep 22 01:49:12 2013 +0300 fixes in rk1968 profile handling --- upstream/src/aghermann/ui/sf/d/rk1968-profiles_cb.cc |6 +++--- upstream/src/aghermann/ui/sf/d/rk1968.cc |6 ++ upstream/src/aghermann/ui/sf/d/rk1968.hh |1 + upstream/src/aghermann/ui/sf/d/rk1968_cb.cc |6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/d/rk1968-profiles_cb.cc b/upstream/src/aghermann/ui/sf/d/rk1968-profiles_cb.cc index e7eb240..d56d9b9 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968-profiles_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968-profiles_cb.cc @@ -72,13 +72,13 @@ void eSFRKProfileSaveName_changed_cb( } void -eSFRK_any_pattern_origin_toggled_cb( +eSFRK_any_profile_origin_toggled_cb( GtkRadioButton*, -const gpointer userdata) +gpointer userdata) { auto& RK = *(SScoringFacility::SRK1968Dialog*)userdata; -RK.eXProfileSaveName_changed_cb(); +RK.eX_any_profile_origin_toggled_cb(); } diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.cc b/upstream/src/aghermann/ui/sf/d/rk1968.cc index fa31dad..93f4f16 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968.cc @@ -83,6 +83,12 @@ SRK1968Dialog (SScoringFacility& p_) G_CONNECT_1 (eSFRKProfileSaveName, changed); +for ( auto& W : {eSFRKProfileSaveOriginUser, eSFRKProfileSaveOriginExperiment, eSFRKProfileSaveOriginSubject} ) +g_signal_connect( +W, "toggled", +(GCallback)eSFRK_any_profile_origin_toggled_cb, +this); + // 2. dialog W_V.reg( eSFRKNremThetaDeltaRatio, &Pp2.Pp.nrem3_delta_theta_ratio); } diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.hh b/upstream/src/aghermann/ui/sf/d/rk1968.hh index 5aab52b..e72d18e 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968.hh +++ b/upstream/src/aghermann/ui/sf/d/rk1968.hh @@ -97,6 +97,7 @@ void eSFRK_any_profile_value_changed_cb( GtkSpinButton*, gpointer); void bSFRKTry_clicked_cb( GtkButton*, gpointer); void bSFRKModify_clicked_cb( GtkButton*, gpointer); +void eSFRK_any_profile_origin_toggled_cb(GtkRadioButton*, gpointer); void eSFRKProfileSaveName_changed_cb(GtkEditable*, gpointer); } diff --git a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc index ba5e8bb..d2ec435 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc @@ -20,7 +20,7 @@ gboolean wSFRK_configure_event_cb( GtkWidget*, GdkEventConfigure*, -gpointer userdata) +const gpointer userdata) { auto& RK = *(SScoringFacility::SRK1968Dialog*)userdata; @@ -31,7 +31,7 @@ wSFRK_configure_event_cb( void wSFRK_show_cb( GtkWidget*, -gpointer userdata) +const gpointer userdata) { auto& RK = *(SScoringFacility::SRK1968Dialog*)userdata; auto& SF = RK._p; @@ -40,7 +40,7 @@ wSFRK_show_cb( if ( RK.profiles.empty() ) RK.profiles.emplace_back( -*RK._p._p.ED, +*SF._p.ED, agh::SExpDirLevelId {SF._p.ED->group_of(SF.csubject()), SF.csubject().id, SF.session()}); RK.populate_combo(); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 67/85: split heavy itpp-dependent inline cairo_draw_signal from ui.hh
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a2fd0082b00655d938e33192cfea0c28b05252a3 Author: Andrei Zavada Date: Sun Sep 22 01:47:44 2013 +0300 split heavy itpp-dependent inline cairo_draw_signal from ui.hh --- upstream/src/aghermann/ui/sf/montage.cc |1 + upstream/src/aghermann/ui/sf/sf.hh |1 + upstream/src/aghermann/ui/ui-itpp.hh| 61 +++ upstream/src/aghermann/ui/ui.hh | 22 --- 4 files changed, 63 insertions(+), 22 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/montage.cc b/upstream/src/aghermann/ui/sf/montage.cc index e4fab03..8eff24e 100644 --- a/upstream/src/aghermann/ui/sf/montage.cc +++ b/upstream/src/aghermann/ui/sf/montage.cc @@ -13,6 +13,7 @@ #include "common/lang.hh" #include "aghermann/ui/misc.hh" +#include "aghermann/ui/ui-itpp.hh" #include "aghermann/ui/mw/mw.hh" #include "channel.hh" #include "sf.hh" diff --git a/upstream/src/aghermann/ui/sf/sf.hh b/upstream/src/aghermann/ui/sf/sf.hh index f75bb99..054924a 100644 --- a/upstream/src/aghermann/ui/sf/sf.hh +++ b/upstream/src/aghermann/ui/sf/sf.hh @@ -17,6 +17,7 @@ #include #include +#include #include "common/alg.hh" #include "common/config-validate.hh" diff --git a/upstream/src/aghermann/ui/ui-itpp.hh b/upstream/src/aghermann/ui/ui-itpp.hh new file mode 100644 index 000..90fa1be --- /dev/null +++ b/upstream/src/aghermann/ui/ui-itpp.hh @@ -0,0 +1,61 @@ +/* + * File name: aghermann/ui/ui-itpp.hh + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-21 + * + * Purpose: simple, C-style UI supporting functions (those which need itpp) + * + * License: GPL + */ + + +#ifndef AGH_AGHERMANN_UI_UI_ITPP_H_ +#define AGH_AGHERMANN_UI_UI_ITPP_H_ + +#include +#include "ui.hh" + +#if HAVE_CONFIG_H && !defined(VERSION) +# include "config.h" +#endif + +using namespace std; + +namespace agh { +namespace ui { + + +inline void +cairo_draw_signal( cairo_t *cr, + const itpp::Mat& signal, int row, + ssize_t start, ssize_t end, + size_t width, double hdisp, double vdisp, float display_scale, + unsigned short decimate = 1, + TDrawSignalDirection direction = TDrawSignalDirection::forward, + TDrawSignalPathOption continue_path = TDrawSignalPathOption::yes) +{ +valarray tmp (end - start); // avoid copying other rows, cols +for ( ssize_t c = 0; c < (end-start); ++c ) +if ( likely (start + c > 0 && start + c < (ssize_t)signal.size()) ) +tmp[c] = signal(row, start + c); +cairo_draw_signal( cr, + tmp, 0, end-start, + width, hdisp, vdisp, display_scale, + decimate, + direction, + continue_path); +} + + +} +} // namespace agh::ui + +#endif + +// Local Variables: +// Mode: c++ +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/aghermann/ui/ui.hh b/upstream/src/aghermann/ui/ui.hh index 3b7cae6..8e986c9 100644 --- a/upstream/src/aghermann/ui/ui.hh +++ b/upstream/src/aghermann/ui/ui.hh @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "common/lang.hh" @@ -59,27 +58,6 @@ cairo_draw_signal( cairo_t*, TDrawSignalDirection direction = TDrawSignalDirection::forward, TDrawSignalPathOption continue_path = TDrawSignalPathOption::yes); -inline void -cairo_draw_signal( cairo_t *cr, - const itpp::Mat& signal, int row, - ssize_t start, ssize_t end, - size_t width, double hdisp, double vdisp, float display_scale, - unsigned short decimate = 1, - TDrawSignalDirection direction = TDrawSignalDirection::forward, - TDrawSignalPathOption continue_path = TDrawSignalPathOption::yes) -{ -valarray tmp (end - start); // avoid copying other rows, cols -for ( ssize_t c = 0; c < (end-start); ++c ) -if ( likely (start + c > 0 && start + c < (ssize_t)signal.size()) ) -tmp[c] = signal(row, start + c); -cairo_draw_signal( cr, - tmp, 0, end-start, - width, hdisp, vdisp, display_scale, - decimate, - direction, - continue_path); -} - void cairo_draw_envelope( cairo_t*, const valarray&, -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.a
[med-svn] [aghermann] 85/85: borrow log-facility from cnrun, let it lie spare for now
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit d36d90cdd43d0c88d9c72e2da014215129f6bec0 Author: Andrei Zavada Date: Fri Sep 27 02:45:05 2013 +0300 borrow log-facility from cnrun, let it lie spare for now --- upstream/src/common/log-facility.cc | 145 +++ upstream/src/common/log-facility.hh | 75 ++ 2 files changed, 220 insertions(+) diff --git a/upstream/src/common/log-facility.cc b/upstream/src/common/log-facility.cc new file mode 100644 index 000..be7fc86 --- /dev/null +++ b/upstream/src/common/log-facility.cc @@ -0,0 +1,145 @@ +/* + * Author: Andrei Zavada + * + * License: GPL-2+ + * + * Initial version: 2009-06-28 + * + */ + +#include +#include +#include +#include +#include + +#include "config.h" + +#include "log-facility.hh" + +using namespace std; + + +Stilton::CLogFacility:: +CLogFacility( const char *log_fname, + int inlog_threshold, + int instdout_tee_threshold, + unsigned short insec_dec_place, + int bits, + size_t buf_size) + : status (bits), + log_threshold (inlog_threshold), + stdout_tee_threshold (instdout_tee_threshold), + sec_dec_places (insec_dec_place) +{ + _line_buf = new char[_buf_size = buf_size]; + if ( log_fname && strlen(log_fname) ) { + _log_fname = string(log_fname); + _log_strm.open( log_fname); + unitbuf( _log_strm); + } +} + +Stilton::CLogFacility:: +~CLogFacility() +{ + if ( _log_fname.size() ) + _log_strm.close(); + delete[] _line_buf; +} + + +void +Stilton::CLogFacility:: +msg( int vrb, const char *client_name, const char* fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + msgv( vrb, client_name, fmt, ap); + va_end (ap); +} + + +void +Stilton::CLogFacility:: +msgv( int vrb, const char *client_name, const char* fmt, va_list ap) +{ +// if ( status & STILTON_LOG_NOLOCK ) +// boost::interprocess::scoped_lock L( _log_lock); + + if ( log_threshold < vrb && stdout_tee_threshold < vrb ) + return; + + char timestampbuf[32]; + time_t timestamp; time( ×tamp); + struct timeval tp; gettimeofday( &tp, nullptr); + strftime( timestampbuf, 31, "%F %T", localtime( ×tamp)); + char secfracbuf[sec_dec_places+3]; + snprintf( secfracbuf, sec_dec_places+2, ".%0*u", sec_dec_places, + (unsigned)round( tp.tv_usec / pow( 10., 6-sec_dec_places-1))); + + vsnprintf( _line_buf, _buf_size, fmt, ap); + + char *line = strtok( _line_buf, "\n"); + do { + if ( vrb < 0 ) + printf( "%s%sError: %s\n", client_name ? client_name : "", (client_name && strlen(client_name)) ? ": " : "", line); + else if ( stdout_tee_threshold >= vrb ) + printf( "%s%s%s\n", client_name ? client_name : "", (client_name && strlen(client_name)) ? ": " : "", line); + + if ( log_threshold >= vrb && _log_fname.size() ) + _log_strm << timestampbuf << (sec_dec_places > 0 ? secfracbuf : "") << ' ' + << client_name << ": " + << (vrb < 0 ? "Error: " : "") << line << endl; + } while ( (line = strtok( nullptr, "\n")) ); + + if ( _log_fname.size() ) + _log_strm.flush(); +} + + + +// a one-liner, possibly unterminated by \n +void +Stilton::CLogFacility:: +msg_( int vrb, const char *client_name, const char* fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + msgv_( vrb, client_name, fmt, ap); + va_end (ap); +} + +void +Stilton::CLogFacility:: +msgv_( int vrb, const char *client_name, const char* fmt, va_list ap) +{ +// if ( status & STILTON_LOG_NOLOCK ) +// boost::interprocess::scoped_lock L( _log_lock); + + if ( log_threshold < vrb && stdout_tee_threshold < vrb ) + return; + + char timestampbuf[32]; + time_t timestamp; time( ×tamp); + struct timeval tp; gettimeofday( &tp, nullptr); + strftime( timestampbuf, 31, "%F %T", localtime( ×tamp)); + char secfracbuf[sec_dec_places+3]; + snprintf( secfracbuf, sec_dec_places+2, ".%0*u", sec_dec_places, + (unsigned)round( tp.tv_usec / pow( 10., 6-sec_dec_places-1))); + + vsnprintf( _line_buf, _buf_size, fmt, ap); + + if ( vrb < 0 ) + printf( "%s%sError: %s", client_name ? client_name : "", (client_name && strlen(client_name)) ? ": " : "", _line_buf); + else if ( stdout_tee_threshold >= vrb ) + printf( "%s%s%s", client_name ? client_name : "", (client_name && strlen(client_name)) ? ": " : "", _line_buf); + + if ( log_threshold >= vrb && _log_fname.size() ) + _log_strm << timesta
[med-svn] [aghermann] 58/85: let the rk1968 widgets be shown
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 85fbc32223fdcd6d9b96794fca2c071be51b5943 Author: Andrei Zavada Date: Sat Sep 21 01:08:53 2013 +0300 let the rk1968 widgets be shown --- upstream/src/aghermann/ui/sf/d/rk1968_cb.cc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc index 01918af..ba5e8bb 100644 --- a/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/rk1968_cb.cc @@ -24,7 +24,7 @@ wSFRK_configure_event_cb( { auto& RK = *(SScoringFacility::SRK1968Dialog*)userdata; -return TRUE; +return FALSE; } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 52/85: tweaks to wAbout, wSFRK
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 677d4e2d07188196bf139c758d91f8b23d348420 Author: Andrei Zavada Date: Thu Sep 19 02:53:41 2013 +0300 tweaks to wAbout, wSFRK --- upstream/data/mw-dialogs.glade |6 +- upstream/data/sf-rk1968.glade |2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/upstream/data/mw-dialogs.glade b/upstream/data/mw-dialogs.glade index 4bd37a6..19111f7 100644 --- a/upstream/data/mw-dialogs.glade +++ b/upstream/data/mw-dialogs.glade @@ -420,6 +420,9 @@ With bug reports, either send yours to full changelog) True -True +True +False diff --git a/upstream/data/sf-rk1968.glade b/upstream/data/sf-rk1968.glade index 8c21d9c..fedafaa 100644 --- a/upstream/data/sf-rk1968.glade +++ b/upstream/data/sf-rk1968.glade @@ -5,7 +5,7 @@ 0.01 30 1.5 -0.10001 +0.01 1 -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 66/85: whitespace and trivial ICM
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit cad484b3e09f987e37a76300b5b410353b621bc5 Author: Andrei Zavada Date: Sun Sep 22 01:45:36 2013 +0300 whitespace and trivial ICM --- upstream/src/aghermann/rk1968/rk1968.cc|2 +- upstream/src/aghermann/ui/mw/construct.cc | 137 ++-- .../src/aghermann/ui/sf/d/rk1968-profiles_cb.cc|1 - 3 files changed, 69 insertions(+), 71 deletions(-) diff --git a/upstream/src/aghermann/rk1968/rk1968.cc b/upstream/src/aghermann/rk1968/rk1968.cc index 12960cc..99e54ef 100644 --- a/upstream/src/aghermann/rk1968/rk1968.cc +++ b/upstream/src/aghermann/rk1968/rk1968.cc @@ -27,13 +27,13 @@ using namespace agh::rk1968; -using agh::confval::SValidator; CScoreAssistant:: CScoreAssistant (const string& name_, TExpDirLevel level_, CExpDesign& ED_, const SExpDirLevelId& level_id_) : CStorablePPack (common_subdir, name_, level_, ED_, level_id_) { +using agh::confval::SValidator; config_keys_g.assign({ SValidator("nrem3_delta_theta_ratio", &Pp.nrem3_delta_theta_ratio), }); diff --git a/upstream/src/aghermann/ui/mw/construct.cc b/upstream/src/aghermann/ui/mw/construct.cc index 3873227..595d28d 100644 --- a/upstream/src/aghermann/ui/mw/construct.cc +++ b/upstream/src/aghermann/ui/mw/construct.cc @@ -337,13 +337,13 @@ SExpDesignUIWidgets () AGH_GBGETOBJ (eSWUParamMinUpswingDuration); // --- custom score codes -if ( !(eScoreCode[sigfile::SPage::TScore::none]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeUnscored")) || - !(eScoreCode[sigfile::SPage::TScore::nrem1]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM1")) || - !(eScoreCode[sigfile::SPage::TScore::nrem2]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM2")) || - !(eScoreCode[sigfile::SPage::TScore::nrem3]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM3")) || - !(eScoreCode[sigfile::SPage::TScore::nrem4]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM4")) || - !(eScoreCode[sigfile::SPage::TScore::rem]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeREM")) || - !(eScoreCode[sigfile::SPage::TScore::wake]= (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeWake"))) +if ( !(eScoreCode[sigfile::SPage::TScore::none] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeUnscored")) || + !(eScoreCode[sigfile::SPage::TScore::nrem1] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM1")) || + !(eScoreCode[sigfile::SPage::TScore::nrem2] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM2")) || + !(eScoreCode[sigfile::SPage::TScore::nrem3] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM3")) || + !(eScoreCode[sigfile::SPage::TScore::nrem4] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeNREM4")) || + !(eScoreCode[sigfile::SPage::TScore::rem] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeREM")) || + !(eScoreCode[sigfile::SPage::TScore::wake] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeWake"))) throw runtime_error ("Failed to construct widgets"); // - Bands @@ -408,15 +408,15 @@ SExpDesignUIWidgets () !(eTunable[TTunable::rc][2]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_rc_max")) || !(eTunable[TTunable::rc][3]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_rc_step")) || - !(eTunable[TTunable::fcR][0]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR")) || - !(eTunable[TTunable::fcR][1]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_min")) || - !(eTunable[TTunable::fcR][2]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_max")) || - !(eTunable[TTunable::fcR][3]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_step")) || + !(eTunable[TTunable::fcR][0] = (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR")) || + !(eTunable[TTunable::fcR][1] = (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_min")) || + !(eTunable[TTunable::fcR][2] = (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_max")) || + !(eTunable[TTunable::fcR][3] = (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcR_step")) || - !(eTunable[TTunable::fcW][0]= (GtkSpinButton*)gtk_builder_get_object( builder, "eTunable_fcW")) || - !(eTuna
[med-svn] [aghermann] 54/85: proper operators = and == for SPattern, SScoreAssistantPPack and CStorablePPack
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 055316afb2a0508d01310bd33f91180055d71cab Author: Andrei Zavada Date: Fri Sep 20 03:04:45 2013 +0300 proper operators = and == for SPattern, SScoreAssistantPPack and CStorablePPack --- upstream/src/aghermann/expdesign/dirlevel.hh | 15 ++- upstream/src/aghermann/patterns/patterns.cc |2 +- upstream/src/aghermann/patterns/patterns.hh |4 +++- upstream/src/aghermann/rk1968/rk1968.hh | 11 --- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index f512806..5194821 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -69,7 +69,20 @@ class CStorablePPack { ED (rv.ED), saved (rv.saved) {} -//CStorablePPack& operator=( const CStorablePPack&) = delete; // and because we cannot have identical profiles in tree + +CStorablePPack& +operator=( const CStorablePPack& rv) +{ +subdir = rv.subdir; +name = rv.name; +level = rv.level; +level_id.g = rv.level_id.g; +level_id.j = rv.level_id.j; +level_id.d = rv.level_id.d; +saved = rv.saved; +// leave alone config_keys and ED +return *this; +} string subdir, name; diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 380d3d4..9ba4c07 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -95,7 +95,7 @@ save() template <> int -agh::pattern::SPattern:: +SPattern:: load() { string msg; diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index 7138f76..8edd537 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -152,6 +152,7 @@ struct SPattern SPattern& operator=( const SPattern& rv) { +CStorablePPack::operator=(*this); thing.resize(rv.thing.size()); thing = rv.thing; samplerate = rv.samplerate; @@ -164,6 +165,7 @@ struct SPattern SPattern& operator=( SPattern&& rv) { +CStorablePPack::operator=(move(*this)); swap (thing, rv.thing); samplerate = rv.samplerate; context = rv.context; @@ -175,7 +177,7 @@ struct SPattern bool operator==( const SPattern& rv) const -{ return level == rv.level && name == rv.name; } +{ return Pp == rv.Pp; } // don't bother about CStorable nor criteria size_t pattern_size_essential() const diff --git a/upstream/src/aghermann/rk1968/rk1968.hh b/upstream/src/aghermann/rk1968/rk1968.hh index fcd173e..0c59f57 100644 --- a/upstream/src/aghermann/rk1968/rk1968.hh +++ b/upstream/src/aghermann/rk1968/rk1968.hh @@ -26,9 +26,14 @@ struct SScoreAssistantPPack { SScoreAssistantPPack () : nrem3_delta_theta_ratio (1.5) {} -explicit SScoreAssistantPPack (const SScoreAssistantPPack&) = default; -SScoreAssistantPPack& operator=( const SScoreAssistantPPack&) = default; -SScoreAssistantPPack& operator=( SScoreAssistantPPack&&) = default; +explicit SScoreAssistantPPack (const SScoreAssistantPPack& rv) + : nrem3_delta_theta_ratio (rv.nrem3_delta_theta_ratio) +{} +SScoreAssistantPPack& operator=( const SScoreAssistantPPack& rv) +{ +nrem3_delta_theta_ratio = rv.nrem3_delta_theta_ratio; +return *this; +} bool operator==( const SScoreAssistantPPack& rv) { -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 48/85: experiment-dl.sh is actually installed "$PACKAGE_DATADIR/aghermann"
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 55494a1cb504396a4efff009a37b6652f9f37c2a Author: Andrei Zavada Date: Wed Sep 18 19:23:29 2013 +0300 experiment-dl.sh is actually installed "$PACKAGE_DATADIR/aghermann" --- upstream/src/aghermann/ui/mw/splash.cc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream/src/aghermann/ui/mw/splash.cc b/upstream/src/aghermann/ui/mw/splash.cc index 1a8b833..c7950d5 100644 --- a/upstream/src/aghermann/ui/mw/splash.cc +++ b/upstream/src/aghermann/ui/mw/splash.cc @@ -106,7 +106,7 @@ show_empty_experiment_blurb() gtk_box_pack_start( (GtkBox*)cMeasurements, (GtkWidget*)gtk_image_new_from_file( -PACKAGE_DATADIR "/idle-bg.svg"), +PACKAGE_DATADIR "/aghermann/idle-bg.svg"), TRUE, FALSE, 0); gtk_widget_show_all( (GtkWidget*)cMeasurements); @@ -141,7 +141,7 @@ try_download() const char *argv[] = { "/bin/sh", // vte_get_user_shell(), "-c", -"source " PACKAGE_DATADIR "/experiment-dl.sh", +"source " PACKAGE_DATADIR "/aghermann/experiment-dl.sh", NULL }; vte_terminal_fork_command_full( -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 82/85: check that metrics::profile computed flag is set correctly
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 1b0dc7e2da73086cc853386041451ea3898a0ff9 Author: Andrei Zavada Date: Fri Sep 27 00:21:10 2013 +0300 check that metrics::profile computed flag is set correctly --- upstream/src/libmetrics/page-metrics-base.cc |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/upstream/src/libmetrics/page-metrics-base.cc b/upstream/src/libmetrics/page-metrics-base.cc index 04cb605..d0479d8 100644 --- a/upstream/src/libmetrics/page-metrics-base.cc +++ b/upstream/src/libmetrics/page-metrics-base.cc @@ -128,8 +128,10 @@ compute( const SPPack& req_params) unlink( old_mirror.c_str()); #pragma GCC diagnostic pop -if ( got_it ) +if ( got_it ) { +_status |= TFlags::computed; return 0; +} // printf( "CProfile::compute( %s, %s): %g sec (%zu pp @%zu + %zu sec last incomplete page); bins/size/freq_max = %zu/%g/%g", // _using_F.filename(), _using_F.channel_by_id(_using_sig_no), @@ -138,6 +140,10 @@ compute( const SPPack& req_params) // _bins, binsize, freq_max); auto retval = go_compute(); +if ( retval == 0 ) +_status |= TFlags::computed; +else +_status &= ~TFlags::computed; mirror_enable( new_mirror) or true; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 61/85: include edfhed.glade into aghermann.gresource, have edfhef-gtk make use of common aghermann/ui code
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 58335bb7928e829039682bafb1c9c898fce18e7f Author: Andrei Zavada Date: Sat Sep 21 02:35:45 2013 +0300 include edfhed.glade into aghermann.gresource, have edfhef-gtk make use of common aghermann/ui code --- upstream/data/Makefile.am |4 +- upstream/data/aghermann.gresource.xml |1 + upstream/src/tools/Makefile.am|3 +- upstream/src/tools/edfhed-gtk.cc | 116 ++--- 4 files changed, 55 insertions(+), 69 deletions(-) diff --git a/upstream/data/Makefile.am b/upstream/data/Makefile.am index ea76bd8..e82955e 100644 --- a/upstream/data/Makefile.am +++ b/upstream/data/Makefile.am @@ -6,7 +6,6 @@ uidir := $(datadir)/${PACKAGE} ui_DATA := \ aghermann.png \ - edfhed.glade \ aghermann.gresource \ idle-bg.svg \ experiment-dl.sh @@ -33,7 +32,8 @@ GRESOURCES := \ mw.glade mw-dialogs.glade \ sf.glade sf-artifacts.glade sf-artifacts-simple.glade sf-filters.glade sf-patterns.glade sf-phasediff.glade sf-rk1968.glade \ mf.glade edfhed.glade \ - aghermann.png equations1.png equation-uc.png + aghermann.png equations1.png equation-uc.png \ + edfhed.glade aghermann.gresource: aghermann.gresource.xml $(GRESOURCES) $(glib_compile_resources) aghermann.gresource.xml diff --git a/upstream/data/aghermann.gresource.xml b/upstream/data/aghermann.gresource.xml index 222a536..d32b750 100644 --- a/upstream/data/aghermann.gresource.xml +++ b/upstream/data/aghermann.gresource.xml @@ -16,5 +16,6 @@ sf-phasediff.glade sf-rk1968.glade mf.glade +edfhed.glade diff --git a/upstream/src/tools/Makefile.am b/upstream/src/tools/Makefile.am index 5e1591c..20abea4 100644 --- a/upstream/src/tools/Makefile.am +++ b/upstream/src/tools/Makefile.am @@ -30,11 +30,12 @@ edfhed_LDADD := \ edfhed_gtk_SOURCES := \ edfhed-gtk.cc edfhed_gtk_CXXFLAGS := \ - $(AM_CXXFLAGS) $(GTK_CFLAGS) -DPACKAGE_DATADIR=\"$(datadir)\" + $(AM_CXXFLAGS) $(UNIQUE_CFLAGS) $(GTK_CFLAGS) -DPACKAGE_DATADIR=\"$(datadir)\" edfhed_gtk_LDADD := \ ../libsigfile/libsigfile.la \ ../common/liba.a \ ../libsigproc/libsigproc.la \ + ../aghermann/ui/liba.a \ $(FFTW3_LIBS) $(ITPP_LIBS) $(SAMPLERATE_LIBS) $(GSL_LIBS) \ $(GTK_LIBS) \ $(OPENMP_LDADD) $(LIBFFTW3_LDADD) diff --git a/upstream/src/tools/edfhed-gtk.cc b/upstream/src/tools/edfhed-gtk.cc index ddf52e4..b2be58a 100644 --- a/upstream/src/tools/edfhed-gtk.cc +++ b/upstream/src/tools/edfhed-gtk.cc @@ -15,44 +15,12 @@ #include "libsigfile/edf.hh" #include "libsigfile/typed-source.hh" - -void -pop_ok_message( GtkWindow *parent, const char *str, ...) -{ -va_list ap; -va_start (ap, str); - -static GString *buf = NULL; -if ( buf == NULL ) -buf = g_string_new(""); - -g_string_vprintf( buf, str, ap); -va_end (ap); - -GtkWidget *msg = -gtk_message_dialog_new_with_markup( -parent, -(GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), -GTK_MESSAGE_INFO, -GTK_BUTTONS_OK, -buf->str, NULL); -gtk_dialog_run( (GtkDialog*)msg); -gtk_widget_destroy( msg); -} - - -#define AGH_GBGETOBJ(Type, A)\ -(A = (Type*)(gtk_builder_get_object( __builder, #A))) - -#define AGH_GBGETOBJ3(B, Type, A)\ -(A = (Type*)(gtk_builder_get_object( B, #A))) - -//#include "../ui/globals.hh" - +#include "aghermann/ui/ui.hh" +using agh::ui::pop_ok_message; GtkBuilder -*__builder; +*builder; GtkDialog *wMain; @@ -169,7 +137,7 @@ main( int argc, char **argv) } if ( ui_init() ) { -pop_ok_message( NULL, "UI failed to initialise\n"); +pop_ok_message( NULL, "UI failed to initialise", "Your install is broken."); return 2; } @@ -193,7 +161,7 @@ main( int argc, char **argv) widgets_to_edf_data( F); } } catch (invalid_argument ex) { -pop_ok_message( NULL, ex.what()); +pop_ok_message( NULL, "Heh", "%s", ex.what()); } ui_fini(); @@ -203,7 +171,9 @@ main( int argc, char **argv) -static void + + +void edf_data_to_widgets( const sigfile::CEDFFile& F) { gtk_label_set_markup( lLabel, (string ("File: ") + F.filename() + "").c_str()); @@ -391,37 +361,51 @@ sensitize_channel_nav_buttons() int ui_init() { - // load glade -__builder = gtk_builder_new(); -if ( !gtk_builder_add_from_file( __builder, PACKAGE_DATADIR "/edfhed.glade", NULL) ) {
[med-svn] [aghermann] 47/85: whitespace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 3c677540a48a5637b693e7b8c9cb9f48c1b3a4a0 Author: Andrei Zavada Date: Wed Sep 18 19:22:16 2013 +0300 whitespace --- upstream/src/libsigfile/tsv.cc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/libsigfile/tsv.cc b/upstream/src/libsigfile/tsv.cc index 3707a65..bb4bafd 100644 --- a/upstream/src/libsigfile/tsv.cc +++ b/upstream/src/libsigfile/tsv.cc @@ -175,7 +175,7 @@ _parse_header() if ( _line0[0] == '\n' ) continue; if ( regexec( &RE, _line0, 1+1+2, M, 0) == 0 ) { -stringK = trim( string (_line0, M[1].rm_so, (M[1].rm_eo - M[1].rm_so))), +string K = trim( string (_line0, M[1].rm_so, (M[1].rm_eo - M[1].rm_so))), V = trim( string (_line0, M[3].rm_so, (M[3].rm_eo - M[3].rm_so))); metadata[K] = V; } else if ( _line0[0] != '#' ) -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 74/85: autogen.sh: look for .ac files also in /usr/share/aclocal/ac-archive
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 95397a99d6bfff790e90d5632089948f957f45c3 Author: Andrei Zavada Date: Mon Sep 23 02:02:25 2013 +0300 autogen.sh: look for .ac files also in /usr/share/aclocal/ac-archive --- upstream/autogen.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/autogen.sh b/upstream/autogen.sh index 402acef..ea5c9e4 100755 --- a/upstream/autogen.sh +++ b/upstream/autogen.sh @@ -1,9 +1,9 @@ #!/bin/sh test -d /usr/share/autoconf-archive && AUTOCONF_ARCHIVE="-I /usr/share/autoconf-archive" +test -d /usr/share/aclocal/ac-archive && AUTOCONF_ARCHIVE=$AUTOCONF_ARCHIVE" -I /usr/share/aclocal/ac-archive" libtoolize --force --copy aclocal $AUTOCONF_ARCHIVE autoheader automake --gnu --add-missing --copy autoconf -# or just use autoreconf? -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 81/85: SF: don't leave RK1968 dialog open on SF close
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a43960b50804668b49258c6b88117ba71d596513 Author: Andrei Zavada Date: Fri Sep 27 00:19:37 2013 +0300 SF: don't leave RK1968 dialog open on SF close --- upstream/src/aghermann/ui/sf/sf.cc |3 +++ 1 file changed, 3 insertions(+) diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index e7e25f1..ef7d878 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -27,6 +27,7 @@ #include "d/filters.hh" #include "d/phasediff.hh" #include "d/patterns.hh" +#include "d/rk1968.hh" using namespace std; using namespace agh::ui; @@ -338,6 +339,8 @@ SScoringFacility:: delete _phasediff_d; if ( _filters_d ) delete _filters_d; +if ( _rk1968_d ) +delete _rk1968_d; } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 59/85: move some project-wide filenames to very toplevel project_strings.h
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a23de32e76e1d53632dafa66d9bcde160dde5deb Author: Andrei Zavada Date: Sat Sep 21 02:30:21 2013 +0300 move some project-wide filenames to very toplevel project_strings.h --- upstream/src/Makefile.am |3 +++ upstream/src/aghermann/expdesign/loadsave.cc |9 upstream/src/aghermann/main.cc |1 + upstream/src/aghermann/ui/globals.cc |3 +-- upstream/src/aghermann/ui/mw/loadsave.cc |3 +-- upstream/src/project_strings.h | 31 ++ upstream/src/tools/edfhed-gtk.cc |1 + 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/upstream/src/Makefile.am b/upstream/src/Makefile.am index d0438a6..a1c0719 100644 --- a/upstream/src/Makefile.am +++ b/upstream/src/Makefile.am @@ -4,6 +4,9 @@ SUBDIRS := \ aghermann \ tools +EXTRA_DIST := \ + project_strings.h + # by trial and error, the _CFLAGS mentioned are the minimum required to pre-build all headers AM_CXXFLAGS := \ -Wall -std=c++0x -fno-rtti \ diff --git a/upstream/src/aghermann/expdesign/loadsave.cc b/upstream/src/aghermann/expdesign/loadsave.cc index df184d5..7445ed1 100644 --- a/upstream/src/aghermann/expdesign/loadsave.cc +++ b/upstream/src/aghermann/expdesign/loadsave.cc @@ -9,6 +9,7 @@ * License: GPL */ +#include "project_strings.h" #include "aghermann/model/achermann.hh" #include "expdesign.hh" @@ -16,8 +17,6 @@ using namespace std; using namespace agh; -#define EXPD_FILENAME ".expdesign.conf" - int @@ -27,7 +26,7 @@ load_settings() libconfig::Config conf; try { -conf.readFile( EXPD_FILENAME); +conf.readFile( EXPD_FILE); using namespace confval; get( config_keys_d, conf); @@ -44,7 +43,7 @@ load_settings() tstep[t] = A[3]; } } catch (...) { -fprintf( stderr, "CExpDesign::load_settings(): Something is wrong with %s\n", EXPD_FILENAME); +fprintf( stderr, "CExpDesign::load_settings(): Something is wrong with %s\n", EXPD_FILE); _status = _status | load_fail; @@ -122,7 +121,7 @@ save_settings() confval::put( conf, string("Band.") + FreqBandNames[i], forward_list {freq_bands[i][0], freq_bands[i][1]}); -conf.writeFile( EXPD_FILENAME); +conf.writeFile( EXPD_FILE); return 0; } diff --git a/upstream/src/aghermann/main.cc b/upstream/src/aghermann/main.cc index 21b60e8..c2b3813 100644 --- a/upstream/src/aghermann/main.cc +++ b/upstream/src/aghermann/main.cc @@ -18,6 +18,7 @@ #include #include +#include "project_strings.h" #include "globals.hh" #include "expdesign/expdesign.hh" #include "ui/globals.hh" diff --git a/upstream/src/aghermann/ui/globals.cc b/upstream/src/aghermann/ui/globals.cc index e847213..99e474b 100644 --- a/upstream/src/aghermann/ui/globals.cc +++ b/upstream/src/aghermann/ui/globals.cc @@ -10,6 +10,7 @@ */ #include +#include "project_strings.h" #include "globals.hh" using namespace std; @@ -43,8 +44,6 @@ set_unique_app_window( GtkWindow* w) // own init -#define AGH_UI_GRESOURCE_FILE "aghermann.gresource" - int agh::ui::global:: prepare_for_expdesign() diff --git a/upstream/src/aghermann/ui/mw/loadsave.cc b/upstream/src/aghermann/ui/mw/loadsave.cc index 112982f..f681c02 100644 --- a/upstream/src/aghermann/ui/mw/loadsave.cc +++ b/upstream/src/aghermann/ui/mw/loadsave.cc @@ -11,6 +11,7 @@ #include +#include "project_strings.h" #include "common/config-validate.hh" #include "aghermann/ui/globals.hh" #include "mw.hh" @@ -18,8 +19,6 @@ using namespace std; using namespace agh::ui; -#define CONF_FILE ".aghermann.conf" - namespace { diff --git a/upstream/src/project_strings.h b/upstream/src/project_strings.h new file mode 100644 index 000..0ede050 --- /dev/null +++ b/upstream/src/project_strings.h @@ -0,0 +1,31 @@ +/* + * File name: project_strings.h + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-21 + * + * Purpose: project-wide #define'd things + * + * License: GPL + */ + + +#ifndef AGH_PROJECT_STRINGS_H_ +#define AGH_PROJECT_STRINGS_H_ + +#if HAVE_CONFIG_H && !defined(VERSION) +# include "config.h" +#endif + +#define AGH_UI_GRESOURCE_FILE "aghermann.gresource" +#define EXPD_FILE ".expdesign.conf" +#define CONF_FILE ".aghermann.conf" + +#endif + +// Local Variables: +// Mode: c +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/tools/edfhed-gtk.cc b/upstream/src/tools/edfhed-gtk.cc index f9515c5..492a577 100644 --- a/upstream/src/tools/edfhed-gtk.cc +++ b/upstream/src/tools/
[med-svn] [aghermann] 76/85: whitepace
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 7de490add8e4297d2ca72bf0dbe73cdab390255f Author: Andrei Zavada Date: Mon Sep 23 02:12:21 2013 +0300 whitepace --- upstream/src/common/string.hh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream/src/common/string.hh b/upstream/src/common/string.hh index 42fb302..3083168 100644 --- a/upstream/src/common/string.hh +++ b/upstream/src/common/string.hh @@ -76,7 +76,7 @@ bool has_suffix( const string& s, const string& suffix, TStrCmpCaseOption case_option = TStrCmpCaseOption::sensitive) { -returnsuffix.size() <= s.size() and +return suffix.size() <= s.size() and 0 == (case_option == TStrCmpCaseOption::sensitive ? strcmp : strcasecmp)( &s[s.size()-suffix.size()], &suffix[0]); } -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 22/85: new class CSstorablePPack (part 2/3)
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 2360ab787f91a89516a0068aed2966379d4a9de1 Author: Andrei Zavada Date: Fri Sep 13 02:06:40 2013 +0300 new class CSstorablePPack (part 2/3) --- upstream/src/aghermann/expdesign/dirlevel.cc | 98 +- upstream/src/aghermann/expdesign/dirlevel.hh | 35 +++- upstream/src/aghermann/expdesign/expdesign.cc| 44 +- upstream/src/aghermann/expdesign/expdesign.hh| 29 --- upstream/src/aghermann/expdesign/loadsave.cc |2 - upstream/src/aghermann/expdesign/tree-scanner.cc | 22 + upstream/src/aghermann/patterns/patterns.hh | 28 +-- upstream/src/aghermann/rk1968/rk1968-profiles.cc | 66 +++ upstream/src/aghermann/rk1968/rk1968.cc |9 +- upstream/src/aghermann/rk1968/rk1968.hh |9 +- upstream/src/common/subject_id.hh| 10 +-- upstream/src/libsigfile/typed-source.cc | 22 + upstream/src/libsigfile/typed-source.hh |3 + 13 files changed, 239 insertions(+), 138 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index 0e49339..ffee6fd 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -10,9 +10,12 @@ */ -#include +#include #include +#include "common/string.hh" +#include "common/fs.hh" +#include "expdesign.hh" #include "dirlevel.hh" using namespace std; @@ -24,7 +27,9 @@ exp_dir_level_s( TExpDirLevel x) { switch (x) { case TExpDirLevel::transient: return "~"; -case TExpDirLevel::subject: return "[S]"; +case TExpDirLevel::session: return "[D]"; +case TExpDirLevel::subject: return "[J]"; +case TExpDirLevel::group: return "[G]"; case TExpDirLevel::experiment: return "[E]"; case TExpDirLevel::user:return "[U]"; case TExpDirLevel::system: return ""; @@ -33,6 +38,95 @@ exp_dir_level_s( TExpDirLevel x) } + + +string +CStorablePPack:: +path() const +{ +string append = string("/") + subdir + "/" + name; +switch (level) { +case TExpDirLevel::transient: +return move(string("/tmp") + append); + +case TExpDirLevel::session: +case TExpDirLevel::subject: +case TExpDirLevel::group: +case TExpDirLevel::experiment: +return move(ED.make_dirname( level, level_id) + append); + +case TExpDirLevel::user: +return move(str::sasprintf( "%s/.local/share/aghermann%s", getenv("HOME"), append.c_str())); + +case TExpDirLevel::system: +return move(str::sasprintf( "%s/%s", PACKAGE_DATADIR, append.c_str())); +} + +throw invalid_argument ("bad TExpDirLevel"); +} + +int +CStorablePPack:: +load() +{ +libconfig::Config conf; + +try { +conf.readFile( path().c_str()); + +using namespace confval; +get( config_keys_d, conf); +get( config_keys_z, conf); +get( config_keys_g, conf); +get( config_keys_b, conf); +get( config_keys_s, conf); + +saved = true; + +return 0; + +} catch (...) { +return -1; +} +} + + +int +CStorablePPack:: +save() +{ +if ( saved || level == TExpDirLevel::transient || level == TExpDirLevel::system ) +return 0; + +string p = path(); +if ( fs::mkdir_with_parents( fs::dirname(p)) ) { +fprintf( stderr, "CStorablePPack::save(\"%s\"): mkdir failed: %s\n", p.c_str(), strerror(errno)); +return -1; +} + +try { +libconfig::Config conf; + +using namespace confval; +put( config_keys_d, conf); +put( config_keys_g, conf); +put( config_keys_b, conf); +put( config_keys_s, conf); +put( config_keys_z, conf); + +conf.writeFile( p.c_str()); + +saved = true; + +return 0; + +} catch (...) { +return -1; +} +} + + + // Local Variables: // Mode: c++ // indent-tabs-mode: nil diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index 33ceb19..7458255 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -19,6 +19,7 @@ #include #include "common/config-validate.hh" +#include "forward-decls.hh" #if HAVE_CONFIG_H && !defined(VERSION) # include "config.h" @@ -31,25 +32,51 @@ using namespace std; enum class TExpDirLevel { transient, +session,
[med-svn] [aghermann] 49/85: Merge branch 'master' of github.com:hmmr/aghermann
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 40424bc4768b4b7b59984d9b90a15253928989fe Merge: 55494a1 65b964b Author: Andrei Zavada Date: Wed Sep 18 19:36:56 2013 +0300 Merge branch 'master' of github.com:hmmr/aghermann README.md |2 ++ 1 file changed, 2 insertions(+) -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 15/85: SF: move common expr out of loop in pattern finding
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit e53a80cca6236b0352b79352f74bf7c709550bec Author: Andrei Zavada Date: Tue Sep 10 02:16:08 2013 +0300 SF: move common expr out of loop in pattern finding --- upstream/src/aghermann/patterns/patterns.ii | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/upstream/src/aghermann/patterns/patterns.ii b/upstream/src/aghermann/patterns/patterns.ii index 034ea76..9b0c704 100644 --- a/upstream/src/aghermann/patterns/patterns.ii +++ b/upstream/src/aghermann/patterns/patterns.ii @@ -46,17 +46,17 @@ do_search( const valarray& fenv_l, // here be all diffs diff.resize( fsize); -size_tessential_part = size_essential(); -for ( ssize_t i = 0; i+inc < fsize - essential_part; i += inc ) { -autop0 = penv.centre( SPatternPPack::env_scope), -p1 = penv.breadth( SPatternPPack::env_scope), -p2 = ptarget_freq( SPatternPPack::bwf_ffrom, - SPatternPPack::bwf_fupto, - SPatternPPack::bwf_order), -p3 = pdzcdf( SPatternPPack::dzcdf_step, - SPatternPPack::dzcdf_sigma, - SPatternPPack::dzcdf_smooth); +size_t essential_part = size_essential(); +autop0 = penv.centre( SPatternPPack::env_scope), +p1 = penv.breadth( SPatternPPack::env_scope), +p2 = ptarget_freq( SPatternPPack::bwf_ffrom, + SPatternPPack::bwf_fupto, + SPatternPPack::bwf_order), +p3 = pdzcdf( SPatternPPack::dzcdf_step, + SPatternPPack::dzcdf_sigma, + SPatternPPack::dzcdf_smooth); +for ( ssize_t i = 0; i+inc < fsize - essential_part; i += inc ) { Td0 = 0., d1 = 0., d2 = 0., d3 = 0.; for ( size_t j = 0; j < essential_part; ++j ) { d0 += gsl_pow_2( p0[context.first + j] - (fenv_u[i+j] + fenv_l[i+j])/2); -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 55/85: CStorablePPack::delete_file() is virtual fair enough
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 053d1c87bd106458ac6477603c3cdea1a9b49a43 Author: Andrei Zavada Date: Sat Sep 21 01:05:39 2013 +0300 CStorablePPack::delete_file() is virtual fair enough --- upstream/src/aghermann/expdesign/dirlevel.cc |9 + upstream/src/aghermann/expdesign/dirlevel.hh |1 + upstream/src/aghermann/patterns/patterns.cc |9 - upstream/src/aghermann/patterns/patterns.hh |2 -- upstream/src/aghermann/rk1968/rk1968-profiles.cc |8 upstream/src/aghermann/rk1968/rk1968.hh |2 -- 6 files changed, 10 insertions(+), 21 deletions(-) diff --git a/upstream/src/aghermann/expdesign/dirlevel.cc b/upstream/src/aghermann/expdesign/dirlevel.cc index 86b76a8..d4b624d 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.cc +++ b/upstream/src/aghermann/expdesign/dirlevel.cc @@ -137,6 +137,15 @@ save() } + +int +CStorablePPack:: +delete_file() const +{ +return unlink( path().c_str()); +} + + string CStorablePPack:: serialize() const diff --git a/upstream/src/aghermann/expdesign/dirlevel.hh b/upstream/src/aghermann/expdesign/dirlevel.hh index 5194821..68a3866 100644 --- a/upstream/src/aghermann/expdesign/dirlevel.hh +++ b/upstream/src/aghermann/expdesign/dirlevel.hh @@ -103,6 +103,7 @@ class CStorablePPack { virtual int load(); virtual int save(); +virtual int delete_file() const; virtual string serialize() const; void touch() { saved = false; } diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index 9ba4c07..8d4faf0 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -233,15 +233,6 @@ SPattern (const string& name_, TExpDirLevel level_, CExpDesign& ED_, const SExpD } -template <> -int -SPattern:: -delete_file() -{ -printf( "deleting %s\n", path().c_str()); -return unlink( path().c_str()); -} - } diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index 8edd537..590bf27 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -196,8 +196,6 @@ struct SPattern int save(); string serialize() const; -int delete_file(); - valarray thing; size_t samplerate; diff --git a/upstream/src/aghermann/rk1968/rk1968-profiles.cc b/upstream/src/aghermann/rk1968/rk1968-profiles.cc index bbe98f8..b17deba 100644 --- a/upstream/src/aghermann/rk1968/rk1968-profiles.cc +++ b/upstream/src/aghermann/rk1968/rk1968-profiles.cc @@ -23,14 +23,6 @@ using namespace std; using namespace agh::rk1968; -int -CScoreAssistant:: -delete_file() -{ -return unlink( path().c_str()); -} - - // Local Variables: diff --git a/upstream/src/aghermann/rk1968/rk1968.hh b/upstream/src/aghermann/rk1968/rk1968.hh index 0c59f57..69a34e7 100644 --- a/upstream/src/aghermann/rk1968/rk1968.hh +++ b/upstream/src/aghermann/rk1968/rk1968.hh @@ -85,8 +85,6 @@ class CScoreAssistant int score( agh::SEpisode&); -int delete_file(); - SScoreAssistantPPack Pp; }; -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 12/85: ICM
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 3f90c126109fc86be576349dd9d77cefcf567480 Author: Andrei Zavada Date: Sat Sep 7 16:09:41 2013 +0300 ICM --- upstream/src/aghermann/ica/Makefile.am |1 + upstream/src/aghermann/ica/forward-decls.hh| 28 ++ upstream/src/aghermann/patterns/patterns.cc|8 +-- upstream/src/aghermann/patterns/patterns.hh|2 +- upstream/src/aghermann/ui/sf/channel.hh|3 +- .../ui/sf/d/artifacts-simple-construct.cc |2 +- upstream/src/aghermann/ui/sf/d/artifacts-simple.cc |4 +- upstream/src/aghermann/ui/sf/d/artifacts.cc| 40 +++--- upstream/src/aghermann/ui/sf/d/artifacts.hh|8 +-- upstream/src/aghermann/ui/sf/ica_cb.cc |2 +- upstream/src/aghermann/ui/sf/sf.cc | 57 upstream/src/aghermann/ui/sf/sf.hh | 12 + upstream/src/aghermann/ui/sf/widgets.hh|3 +- upstream/src/libsigproc/Makefile.am|1 + upstream/src/libsigproc/forward-decls.hh | 34 upstream/src/libsigproc/sigproc.hh | 54 +-- 16 files changed, 164 insertions(+), 95 deletions(-) diff --git a/upstream/src/aghermann/ica/Makefile.am b/upstream/src/aghermann/ica/Makefile.am index fbb50e6..ae814a6 100644 --- a/upstream/src/aghermann/ica/Makefile.am +++ b/upstream/src/aghermann/ica/Makefile.am @@ -3,4 +3,5 @@ AM_CXXFLAGS := \ -I$(top_srcdir)/src EXTRA_DIST := \ + forward-decls.hh \ ica.hh diff --git a/upstream/src/aghermann/ica/forward-decls.hh b/upstream/src/aghermann/ica/forward-decls.hh new file mode 100644 index 000..6f92206 --- /dev/null +++ b/upstream/src/aghermann/ica/forward-decls.hh @@ -0,0 +1,28 @@ +/* + * File name: aghermann/ica/forward-decls.hh + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-07 + * + * Purpose: + * + * License: GPL + */ + +#ifndef AGH_ICA_FORWARD_DECLS_H_ +#define AGH_ICA_FORWARD_DECLS_H_ + +namespace ica { + +class CFastICA; + +} + +#endif + +// Local Variables: +// Mode: c++ +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/aghermann/patterns/patterns.cc b/upstream/src/aghermann/patterns/patterns.cc index f0e6146..2ca84b3 100644 --- a/upstream/src/aghermann/patterns/patterns.cc +++ b/upstream/src/aghermann/patterns/patterns.cc @@ -47,8 +47,8 @@ load_pattern( const char* fname) throw(invalid_argument) FILE *fd = fopen( fname, "r"); if ( fd ) { -size_tfull_sample; -double t1, t2, t3, t4; +size_t full_sample; +double t1, t2, t3, t4; if ( fscanf( fd, "%lg %u %lg %lg %lg %lg %u" " %lg %lg %lg %lg" @@ -185,7 +185,7 @@ load_patterns_from_location( const string& loc, pattern::TOrigin origin) ret; struct dirent **eps; -inttotal = scandir( loc.c_str(), &eps, scandir_filter, alphasort); +int total = scandir( loc.c_str(), &eps, scandir_filter, alphasort); if ( total != -1 ) { for ( int i = 0; i < total; ++i ) { @@ -201,7 +201,7 @@ load_patterns_from_location( const string& loc, pattern::TOrigin origin) free( (void*)eps); } -return ret; +return move(ret); } diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index 87b512d..d412864 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -140,7 +140,7 @@ class CPatternTool size_t ctx_before, ctx_after; -Tcrit_linear_unity; +T crit_linear_unity; double crit_dzcdf_unity; }; diff --git a/upstream/src/aghermann/ui/sf/channel.hh b/upstream/src/aghermann/ui/sf/channel.hh index 1a581ca..eb2b52d 100644 --- a/upstream/src/aghermann/ui/sf/channel.hh +++ b/upstream/src/aghermann/ui/sf/channel.hh @@ -20,7 +20,7 @@ #include "common/alg.hh" #include "common/config-validate.hh" -#include "libsigproc/sigproc.hh" +#include "libsigproc/forward-decls.hh" #include "libsigfile/forward-decls.hh" #include "libmetrics/mc-artifacts.hh" #include "libmetrics/page-metrics-base.hh" @@ -28,7 +28,6 @@ #include "aghermann/patterns/forward-decls.hh" #include "aghermann/expdesign/forward-decls.hh" #include "aghermann/expdesign/recording.hh" -// #include "aghermann/ui/ui++.hh" #include "sf.hh" diff --git a/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc b/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc index ea53f47..2b72c74 10064
[med-svn] [aghermann] 11/85: separate struct SScoringFacility::SChannel into own sf/channel.hh
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 7dea678d785707947cd6a47f8e99a218632be8ff Author: Andrei Zavada Date: Sat Sep 7 01:46:19 2013 +0300 separate struct SScoringFacility::SChannel into own sf/channel.hh --- upstream/src/aghermann/patterns/Makefile.am|1 + upstream/src/aghermann/patterns/forward-decls.hh | 32 ++ upstream/src/aghermann/patterns/patterns.hh| 30 +- upstream/src/aghermann/ui/mw/mainmenu_cb.cc|1 + upstream/src/aghermann/ui/sf/Makefile.am |1 + upstream/src/aghermann/ui/sf/channel.cc|2 + upstream/src/aghermann/ui/sf/channel.hh| 374 upstream/src/aghermann/ui/sf/d/artifacts-simple.hh |2 +- upstream/src/aghermann/ui/sf/d/artifacts.cc|1 + upstream/src/aghermann/ui/sf/d/artifacts_cb.cc |3 +- .../src/aghermann/ui/sf/d/filters-construct.cc |2 +- upstream/src/aghermann/ui/sf/d/filters.cc |1 + upstream/src/aghermann/ui/sf/d/filters_cb.cc |2 +- .../src/aghermann/ui/sf/d/patterns-construct.cc|1 + upstream/src/aghermann/ui/sf/d/patterns-draw.cc|3 +- .../src/aghermann/ui/sf/d/patterns-profiles.cc |3 +- .../src/aghermann/ui/sf/d/patterns-profiles_cb.cc |1 + upstream/src/aghermann/ui/sf/d/patterns.cc |2 +- upstream/src/aghermann/ui/sf/d/patterns_cb.cc |3 +- .../src/aghermann/ui/sf/d/phasediff-construct.cc |2 +- upstream/src/aghermann/ui/sf/d/phasediff.cc|3 +- upstream/src/aghermann/ui/sf/d/phasediff_cb.cc |3 +- upstream/src/aghermann/ui/sf/hypnogram.cc |2 + upstream/src/aghermann/ui/sf/ica.cc|1 + upstream/src/aghermann/ui/sf/mainmenu_cb.cc|2 + upstream/src/aghermann/ui/sf/montage-overlays.cc |3 +- upstream/src/aghermann/ui/sf/montage.cc|3 +- upstream/src/aghermann/ui/sf/montage_cb.cc |3 +- upstream/src/aghermann/ui/sf/sf.cc | 22 +- upstream/src/aghermann/ui/sf/sf.hh | 349 +- upstream/src/aghermann/ui/sf/sf_cb.cc |1 + upstream/src/libsigfile/forward-decls.hh |4 + upstream/src/libsigfile/source-base.hh | 13 +- 33 files changed, 509 insertions(+), 367 deletions(-) diff --git a/upstream/src/aghermann/patterns/Makefile.am b/upstream/src/aghermann/patterns/Makefile.am index 29e2fe0..a32f72d 100644 --- a/upstream/src/aghermann/patterns/Makefile.am +++ b/upstream/src/aghermann/patterns/Makefile.am @@ -5,6 +5,7 @@ AM_CXXFLAGS := \ noinst_LIBRARIES := liba.a liba_a_SOURCES := \ + forward-decls.hh \ patterns.cc patterns.hh patterns.ii # EXTRA_DIST := \ diff --git a/upstream/src/aghermann/patterns/forward-decls.hh b/upstream/src/aghermann/patterns/forward-decls.hh new file mode 100644 index 000..0078781 --- /dev/null +++ b/upstream/src/aghermann/patterns/forward-decls.hh @@ -0,0 +1,32 @@ +/* + * File name: aghermann/patterns/forward-decls.hh + * Project: Aghermann + * Author: Andrei Zavada + * Initial version: 2013-09-07 + * + * Purpose: + * + * License: GPL + */ + +#ifndef SIGPROC_PATTERNS_FORWARD_DECLS_H_ +#define SIGPROC_PATTERNS_FORWARD_DECLS_H_ + +namespace pattern { + +template class CMatch; +template struct SPatternPPack; +template class CPatternTool; +template struct SPattern; + +} // namespace pattern + + +#endif + +// Local Variables: +// Mode: c++ +// indent-tabs-mode: nil +// tab-width: 8 +// c-basic-offset: 8 +// End: diff --git a/upstream/src/aghermann/patterns/patterns.hh b/upstream/src/aghermann/patterns/patterns.hh index 922b44f..87b512d 100644 --- a/upstream/src/aghermann/patterns/patterns.hh +++ b/upstream/src/aghermann/patterns/patterns.hh @@ -47,16 +47,16 @@ class CMatch template struct SPatternPPack { -doubleenv_scope; -doublebwf_ffrom, +double env_scope; +double bwf_ffrom, bwf_fupto; -intbwf_order; -double dzcdf_step, +int bwf_order; +double dzcdf_step, dzcdf_sigma; -intdzcdf_smooth; +int dzcdf_smooth; bool operator==( const SPatternPPack& rv) const // cannot be defaulted! { -returnenv_scope == rv.env_scope && +return env_scope == rv.env_scope && bwf_ffrom == rv.bwf_ffrom && bwf_fupto == rv.bwf_fupto && bwf_order == rv.bwf_order && @@ -66,7 +66,7 @@ struct SPatternPPack { } bool sane() const { -returnenv_scope > 0. && env_scope <= 1. && +
[med-svn] [aghermann] 57/85: anon namespace within extern "C" is pointless
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 31dc79c47117f92cb672bd909eeef90e6c5edba4 Author: Andrei Zavada Date: Sat Sep 21 01:08:13 2013 +0300 anon namespace within extern "C" is pointless --- upstream/src/aghermann/ui/sf/d/patterns_cb.cc |2 -- 1 file changed, 2 deletions(-) diff --git a/upstream/src/aghermann/ui/sf/d/patterns_cb.cc b/upstream/src/aghermann/ui/sf/d/patterns_cb.cc index 4727a50..ccddf3b 100644 --- a/upstream/src/aghermann/ui/sf/d/patterns_cb.cc +++ b/upstream/src/aghermann/ui/sf/d/patterns_cb.cc @@ -363,14 +363,12 @@ eSFFD_any_profile_value_changed_cb( gtk_widget_queue_draw( (GtkWidget*)FD.daSFFDThing); } -namespace { inline double timeval_elapsed( const struct timeval &x, const struct timeval &y) { return y.tv_sec - x.tv_sec + 1e-6 * (y.tv_usec - x.tv_usec); } -} void eSFFD_any_criteria_value_changed_cb( -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 10/85: ICM
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 6475f07d292f27504fdda7f9a7f5f24937e7871d Author: Andrei Zavada Date: Sat Sep 7 00:31:06 2013 +0300 ICM --- upstream/src/aghermann/main.cc |2 +- upstream/src/aghermann/ui/globals.cc | 63 ++-- upstream/src/aghermann/ui/globals.hh |5 + upstream/src/aghermann/ui/sf/sf.cc | 17 upstream/src/aghermann/ui/sf/sf.hh | 184 +- upstream/src/aghermann/ui/sm/sm.cc |7 +- upstream/src/aghermann/ui/ui.cc | 55 -- upstream/src/aghermann/ui/ui.hh |4 - 8 files changed, 173 insertions(+), 164 deletions(-) diff --git a/upstream/src/aghermann/main.cc b/upstream/src/aghermann/main.cc index 685f78e..21b60e8 100644 --- a/upstream/src/aghermann/main.cc +++ b/upstream/src/aghermann/main.cc @@ -83,7 +83,7 @@ main( int argc, char **argv) agh::global::init(); -if ( ui::prepare_for_expdesign() ) { +if ( agh::ui::global::prepare_for_expdesign() ) { ui::pop_ok_message( NULL, "UI failed to initialize", diff --git a/upstream/src/aghermann/ui/globals.cc b/upstream/src/aghermann/ui/globals.cc index d66e205..e847213 100644 --- a/upstream/src/aghermann/ui/globals.cc +++ b/upstream/src/aghermann/ui/globals.cc @@ -13,21 +13,70 @@ #include "globals.hh" using namespace std; -using namespace agh::ui; +using namespace agh::ui::global; -charglobal::buf[AGH_BUF_SIZE]; +charagh::ui::global::buf[AGH_BUF_SIZE]; GdkDevice -*global::client_pointer; +*agh::ui::global::client_pointer; UniqueApp -*global::unique_app; +*agh::ui::global::unique_app; GtkWindow -*global::main_window; +*agh::ui::global::main_window; + +double agh::ui::global::hdpmm, +agh::ui::global::vdpmm; + + +// unique + +void +agh::ui::global:: +set_unique_app_window( GtkWindow* w) +{ +unique_app_watch_window( +unique_app, +main_window = w); +} + +// own init + +#define AGH_UI_GRESOURCE_FILE "aghermann.gresource" + +int +agh::ui::global:: +prepare_for_expdesign() +{ + // tell me what they are +client_pointer = +gdk_device_manager_get_client_pointer( +gdk_display_get_device_manager( gdk_display_get_default())); + +{ +auto scr = gdk_screen_get_default(); + +hdpmm = (double)gdk_screen_get_width ( scr) / gdk_screen_get_width_mm ( scr); +vdpmm = (double)gdk_screen_get_height( scr) / gdk_screen_get_height_mm( scr); +gdk_screen_set_resolution( scr, (hdpmm + vdpmm)/2); +} + +GResource +*gresource += g_resource_load( +PACKAGE_DATADIR "/" PACKAGE "/" AGH_UI_GRESOURCE_FILE, +NULL); +if ( !gresource ) { +fprintf( stderr, "Bad or missing " PACKAGE_DATADIR "/" PACKAGE "/" AGH_UI_GRESOURCE_FILE); +return -1; +} +g_resources_register( gresource); + +return 0; +} + -double global::hdpmm, -global::vdpmm; // Local Variables: diff --git a/upstream/src/aghermann/ui/globals.hh b/upstream/src/aghermann/ui/globals.hh index 3f47729..2cd9b61 100644 --- a/upstream/src/aghermann/ui/globals.hh +++ b/upstream/src/aghermann/ui/globals.hh @@ -46,6 +46,11 @@ extern double extern char buf[AGH_BUF_SIZE]; + +void set_unique_app_window( GtkWindow*); + +int prepare_for_expdesign(); + } } } // namespace agh::ui::global diff --git a/upstream/src/aghermann/ui/sf/sf.cc b/upstream/src/aghermann/ui/sf/sf.cc index 4d3c59a..c5021a3 100644 --- a/upstream/src/aghermann/ui/sf/sf.cc +++ b/upstream/src/aghermann/ui/sf/sf.cc @@ -337,6 +337,23 @@ SScoringFacility:: delete _filters_d; } + + +int +SScoringFacility:: +channel_idx( SChannel* h) const +{ + int i = 0; + for ( auto& H : channels ) + if ( &H == h ) + return i; + else ++i; + return -1; +} + + + + void SScoringFacility:: redraw_ssubject_timeline() const diff --git a/upstream/src/aghermann/ui/sf/sf.hh b/upstream/src/aghermann/ui/sf/sf.hh index fa907ed..519d560 100644 --- a/upstream/src/aghermann/ui/sf/sf.hh +++ b/upstream/src/aghermann/ui/sf/sf.hh @@ -61,13 +61,13 @@ class SScoringFacility private: agh::CSubject& _csubject; -string_session; +string _session; agh::SEpisode& _sepisode; public: -agh::CSubject&csubject() const { return _csubject; } -agh::SEpisode&sepisode() const { return _sepis
[med-svn] [aghermann] 70/85: complete a2fd0082b00655
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 601c64f0c2e8edb730b68bfbd55d94623c2fb291 Author: Andrei Zavada Date: Sun Sep 22 01:53:16 2013 +0300 complete a2fd0082b00655 --- upstream/src/aghermann/ui/Makefile.am |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upstream/src/aghermann/ui/Makefile.am b/upstream/src/aghermann/ui/Makefile.am index 64185a6..195bded 100644 --- a/upstream/src/aghermann/ui/Makefile.am +++ b/upstream/src/aghermann/ui/Makefile.am @@ -19,4 +19,5 @@ liba_a_SOURCES := \ ui++.cc \ ui++.hh \ ui.cc \ - ui.hh + ui.hh \ + ui-itpp.hh -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 63/85: make configure.ac print g++ --version in summary
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit a9944a0ae0ebef1b663b45c18dc7b1317558a66f Author: Andrei Zavada Date: Sat Sep 21 14:38:01 2013 +0300 make configure.ac print g++ --version in summary --- upstream/configure.ac |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/upstream/configure.ac b/upstream/configure.ac index 4ef78c0..5967b1d 100644 --- a/upstream/configure.ac +++ b/upstream/configure.ac @@ -50,7 +50,9 @@ ac_cv_cxx_cpp11_features, ]) AC_CXX_STDCPP11_FEATURES() test $ac_cv_cxx_cpp11_features = no && \ - AC_MSG_ERROR([g++ >= 4.6 is required to build $PACKAGE as we must use -std=c++11 features your compiler doesn't seem to support], 1) + AC_MSG_ERROR([g++ >= 4.7 is required to build $PACKAGE as we must use -std=c++11 features your compiler doesn't seem to support], 1) +cxx_version=`$CXX --version | head -n1` + dnl AC_CXX_HAVE_STL # redundant: we check for STL implicitly in AC_CXX_STDCPP0X_FEATURES @@ -228,7 +230,7 @@ AC_MSG_RESULT([ PREFIX: $prefix - CXX:$CXX + CXX:$CXX (${cxx_version}) CXXFLAGS:$CXXFLAGS LDFLAGS: $LDFLAGS OPENMP_CXXFLAGS: $OPENMP_CXXFLAGS -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] [aghermann] 09/85: whitespaaace and a little ICM
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit fd52b8418d97a371d1af9bdb57d73b25fe236768 Author: Andrei Zavada Date: Fri Sep 6 19:53:08 2013 +0300 whitespaaace and a little ICM --- upstream/src/aghermann/main.cc | 11 +-- upstream/src/aghermann/rk1968/rk1968.hh |2 +- upstream/src/common/alg.hh |2 +- upstream/src/common/config-validate.hh |8 +- upstream/src/common/containers.hh|2 +- upstream/src/common/fs.hh|2 +- upstream/src/common/lang.hh |2 +- upstream/src/common/string.hh|2 +- upstream/src/common/subject_id.hh|2 +- upstream/src/libmetrics/all.hh |2 +- upstream/src/libmetrics/bands.hh |2 +- upstream/src/libmetrics/forward-decls.hh |2 +- upstream/src/libmetrics/mc-artifacts.hh |2 +- upstream/src/libmetrics/mc.hh|2 +- upstream/src/libmetrics/page-metrics-base.hh |2 +- upstream/src/libmetrics/psd.hh |2 +- upstream/src/libmetrics/swu.hh |2 +- upstream/src/libsigfile/all.hh |2 +- upstream/src/libsigfile/channel.hh | 32 +++- upstream/src/libsigfile/edf.hh | 68 upstream/src/libsigfile/forward-decls.hh |2 +- upstream/src/libsigfile/page.hh | 26 +++--- upstream/src/libsigfile/source-base.hh | 112 -- upstream/src/libsigfile/tsv.hh | 26 +++--- upstream/src/libsigfile/typed-source.hh |2 +- upstream/src/libsigproc/exstrom.hh |2 +- upstream/src/libsigproc/ext-filters.hh |2 +- upstream/src/libsigproc/sigproc.hh |2 +- upstream/src/libsigproc/winfun.hh|2 +- 29 files changed, 151 insertions(+), 176 deletions(-) diff --git a/upstream/src/aghermann/main.cc b/upstream/src/aghermann/main.cc index b533709..685f78e 100644 --- a/upstream/src/aghermann/main.cc +++ b/upstream/src/aghermann/main.cc @@ -24,12 +24,13 @@ #include "ui/ui.hh" #include "ui/sm/sm.hh" +using namespace std; using namespace agh; void print_version(); namespace { -UniqueResponse message_received_cb( UniqueApp*, UniqueCommand, UniqueMessageData*, const guint, gpointer); +UniqueResponse message_received_cb( UniqueApp*, UniqueCommand, UniqueMessageData*, guint, gpointer); void print_usage( const char*); } @@ -40,7 +41,7 @@ main( int argc, char **argv) print_version(); bool headless = false; -intc; +int c; while ( (c = getopt( argc, argv, "hn")) != -1 ) switch ( c ) { case 'n': // headless @@ -107,9 +108,9 @@ namespace { UniqueResponse message_received_cb( UniqueApp*, -const UniqueCommand command, -UniqueMessageData *message, -const guint time_, +const UniqueCommand command, +UniqueMessageData *message, +const guinttime_, gpointer) { if ( ui::global::main_window == NULL ) diff --git a/upstream/src/aghermann/rk1968/rk1968.hh b/upstream/src/aghermann/rk1968/rk1968.hh index 926faef..84bfd7d 100644 --- a/upstream/src/aghermann/rk1968/rk1968.hh +++ b/upstream/src/aghermann/rk1968/rk1968.hh @@ -18,7 +18,7 @@ namespace agh { namespace rk1968 { struct SScoreAssistantPPack { -doublenrem3_delta_theta_ratio; +double nrem3_delta_theta_ratio; SScoreAssistantPPack (const SScoreAssistantPPack&) = default; SScoreAssistantPPack () diff --git a/upstream/src/common/alg.hh b/upstream/src/common/alg.hh index 7a3b422..1a91f5d 100644 --- a/upstream/src/common/alg.hh +++ b/upstream/src/common/alg.hh @@ -191,7 +191,7 @@ double sensible_scale_reduction_factor( double display_scale, // Local Variables: // Mode: c++ -// indent-tabs-mode: 8 +// indent-tabs-mode: nil // tab-width: 8 // c-basic-offset: 8 // End: diff --git a/upstream/src/common/config-validate.hh b/upstream/src/common/config-validate.hh index cde3f2c..65e8596 100644 --- a/upstream/src/common/config-validate.hh +++ b/upstream/src/common/config-validate.hh @@ -28,17 +28,17 @@ # include "config.h" #endif +using namespace std; + namespace agh { namespace confval { -using namespace std; - template libconfig::Setting::Type libconfig_type_id(); template <> libconfig::Setting::Type inline libconfig_type_id () { return libconfig::Setting::Type::TypeBoolean; } template <> libconfig::Setting::Type inline libconfig_type_id () { return libconfig::Setting::Type::TypeInt; } template <> libconfig::Setting::Type inline libconfig_type_id () { return libconfig::Setting::Type::TypeInt64; } -template <> libconfig::Setting::T
[med-svn] [aghermann] 62/85: static is useless in a main.cc, isn't it?
This is an automated email from the git hooks/post-receive script. hmmr-guest pushed a commit to branch master in repository aghermann. commit 1eedcdcf0f3d7418c1ff29ddae51befca312c434 Author: Andrei Zavada Date: Sat Sep 21 02:36:34 2013 +0300 static is useless in a main.cc, isn't it? --- upstream/src/tools/edfhed-gtk.cc | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/upstream/src/tools/edfhed-gtk.cc b/upstream/src/tools/edfhed-gtk.cc index b2be58a..9587a31 100644 --- a/upstream/src/tools/edfhed-gtk.cc +++ b/upstream/src/tools/edfhed-gtk.cc @@ -52,8 +52,6 @@ void ui_fini(); -static void edf_data_to_widgets( const sigfile::CEDFFile&); -static void widgets_to_edf_data( sigfile::CEDFFile&); sigfile::CEDFFile *Fp; @@ -85,9 +83,11 @@ list list::iterator HTmpi; -static void current_channel_data_to_widgets(); -static void widgets_to_current_channel_data(); -static void sensitize_channel_nav_buttons(); +void edf_data_to_widgets( const sigfile::CEDFFile&); +void widgets_to_edf_data( sigfile::CEDFFile&); +void current_channel_data_to_widgets(); +void widgets_to_current_channel_data(); +void sensitize_channel_nav_buttons(); size_t channel_no; @@ -200,7 +200,7 @@ edf_data_to_widgets( const sigfile::CEDFFile& F) -static void +void widgets_to_edf_data( sigfile::CEDFFile& F) { memcpy( F.header.patient_id, agh::str::pad( gtk_entry_get_text( e[PatientID]), 80).c_str(), 80); @@ -230,7 +230,7 @@ widgets_to_edf_data( sigfile::CEDFFile& F) -static void +void current_channel_data_to_widgets() { GString *tmp = g_string_new(""); @@ -258,7 +258,7 @@ current_channel_data_to_widgets() gtk_entry_set_text( e[ChannelReserved], trim( HTmpi->Reserved ).c_str()); } -static void +void widgets_to_current_channel_data() { HTmpi->Label= gtk_entry_get_text( e[ChannelLabel]); @@ -274,7 +274,7 @@ widgets_to_current_channel_data() } -static bool +bool validate_all_widgets() { const char *str, *p; @@ -307,6 +307,8 @@ validate_all_widgets() + + extern "C" void bNext_clicked_cb( GtkButton*, gpointer) { -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] r14763 - in trunk/packages/cluster3/trunk/debian: . patches
Author: alteholz Date: 2013-09-26 17:48:41 + (Thu, 26 Sep 2013) New Revision: 14763 Added: trunk/packages/cluster3/trunk/debian/patches/build-on-arm.patch Modified: trunk/packages/cluster3/trunk/debian/changelog trunk/packages/cluster3/trunk/debian/patches/series Log: build on arm patch Modified: trunk/packages/cluster3/trunk/debian/changelog === --- trunk/packages/cluster3/trunk/debian/changelog 2013-09-26 10:55:29 UTC (rev 14762) +++ trunk/packages/cluster3/trunk/debian/changelog 2013-09-26 17:48:41 UTC (rev 14763) @@ -1,3 +1,9 @@ +cluster3 (1.52-2) unstable; urgency=low + + * add patch from Stefano Rivera (build on armhf) (Closes: #723561) + + -- Thorsten Alteholz Thu, 26 Sep 2013 18:00:00 +0200 + cluster3 (1.52-1) unstable; urgency=low * rebuild needed for motif transition (Closes: #713062) Added: trunk/packages/cluster3/trunk/debian/patches/build-on-arm.patch === --- trunk/packages/cluster3/trunk/debian/patches/build-on-arm.patch (rev 0) +++ trunk/packages/cluster3/trunk/debian/patches/build-on-arm.patch 2013-09-26 17:48:41 UTC (rev 14763) @@ -0,0 +1,18 @@ +Author: Stefano Rivera +Description: let pacakage build on armhf +--- a/src/Makefile.PL b/src/Makefile.PL +@@ -2,10 +2,10 @@ + use Config; + use POSIX; + +-# Check if this is a 64 bit machine ++# Check if this is an arch where we need position independent code + my $CCFLAGS = ''; + my $machine = (POSIX::uname())[4]; +-if ($machine =~ /64/) { ++if ($machine =~ /64|arm/) { + $CCFLAGS = '-fPIC'; + } + + Modified: trunk/packages/cluster3/trunk/debian/patches/series === --- trunk/packages/cluster3/trunk/debian/patches/series 2013-09-26 10:55:29 UTC (rev 14762) +++ trunk/packages/cluster3/trunk/debian/patches/series 2013-09-26 17:48:41 UTC (rev 14763) @@ -1 +1,2 @@ #compile-warnings.patch +build-on-arm.patch ___ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
[med-svn] r14762 - in trunk/packages: . pyqi pyqi/trunk pyqi/trunk/debian pyqi/trunk/debian/source
Author: tbooth-guest Date: 2013-09-26 10:55:29 + (Thu, 26 Sep 2013) New Revision: 14762 Added: trunk/packages/pyqi/ trunk/packages/pyqi/trunk/ trunk/packages/pyqi/trunk/debian/ trunk/packages/pyqi/trunk/debian/changelog trunk/packages/pyqi/trunk/debian/compat trunk/packages/pyqi/trunk/debian/control trunk/packages/pyqi/trunk/debian/copyright trunk/packages/pyqi/trunk/debian/manpages trunk/packages/pyqi/trunk/debian/rules trunk/packages/pyqi/trunk/debian/source/ trunk/packages/pyqi/trunk/debian/source/format trunk/packages/pyqi/trunk/debian/watch Log: New package PyQi is needed as a new dep for latest python-biom-format. Not strictly a biomedical package so maybe one for the Python team to maintain, but in any case it was small, neat and easy to package so I just did it for Bio-Linux. Added: trunk/packages/pyqi/trunk/debian/changelog === --- trunk/packages/pyqi/trunk/debian/changelog (rev 0) +++ trunk/packages/pyqi/trunk/debian/changelog 2013-09-26 10:55:29 UTC (rev 14762) @@ -0,0 +1,5 @@ +pyqi (0.2.0-0biolinux1) precise; urgency=low + + * Initial release for BL. + + -- Tim Booth Tue, 24 Sep 2013 18:45:50 +0100 Added: trunk/packages/pyqi/trunk/debian/compat === --- trunk/packages/pyqi/trunk/debian/compat (rev 0) +++ trunk/packages/pyqi/trunk/debian/compat 2013-09-26 10:55:29 UTC (rev 14762) @@ -0,0 +1 @@ +9 Added: trunk/packages/pyqi/trunk/debian/control === --- trunk/packages/pyqi/trunk/debian/control(rev 0) +++ trunk/packages/pyqi/trunk/debian/control2013-09-26 10:55:29 UTC (rev 14762) @@ -0,0 +1,17 @@ +Source: pyqi +Section: python +Priority: optional +Maintainer: Tim Booth +Build-Depends: python, python-sphinx, debhelper ( >= 9 ) +Standards-Version: 3.9.3 +Homepage: http://bipy.github.io/pyqi/doc/index.html + +Package: pyqi +Architecture: any +Depends: python, ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} +Description: Python framework for wrapping general commands in multiple interfaces + pyqi (canonically pronounced pie chee) is a Python framework designed to + support wrapping general commands in multiple types of interfaces, including + at the command line, HTML, and API levels. + . + pyqi’s only requirement is a working Python 2.7 installation. Added: trunk/packages/pyqi/trunk/debian/copyright === --- trunk/packages/pyqi/trunk/debian/copyright (rev 0) +++ trunk/packages/pyqi/trunk/debian/copyright 2013-09-26 10:55:29 UTC (rev 14762) @@ -0,0 +1,37 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pyqi +Upstream-Contact: BiPy Development Team +Source: ftp://thebeast.colorado.edu/pub/pyqi-releases/ + +Files: * +Copyright: 2013 BiPy Development Team +License: Modified BSD +pyqi is licensed under the terms of the Modified BSD License (also known as +New or Revised BSD), as follows: + +Copyright (c) 2013, BiPy Development Team + +All rights reserved. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name BiPy nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE BIPY DEVELOPMENT TEAM BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: trunk/packages/pyqi/trunk/debian/manpages === --- trunk/packages/pyq