-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
725 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
from .utils import * | ||
from .qc import * | ||
# Copyright (C) 2013-2022 C-PAC Developers | ||
|
||
# This file is part of C-PAC. | ||
|
||
# C-PAC is free software: you can redistribute it and/or modify it under | ||
# the terms of the GNU Lesser General Public License as published by the | ||
# Free Software Foundation, either version 3 of the License, or (at your | ||
# option) any later version. | ||
|
||
# C-PAC is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
# License for more details. | ||
|
||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>. | ||
"""Quality control utilities for C-PAC""" | ||
from CPAC.qc.globals import registration_guardrail_thresholds, \ | ||
update_thresholds | ||
from CPAC.qc.qcmetrics import qc_masks | ||
__all__ = ['qc_masks', 'registration_guardrail_thresholds', | ||
'update_thresholds'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright (C) 2022 C-PAC Developers | ||
|
||
# This file is part of C-PAC. | ||
|
||
# C-PAC is free software: you can redistribute it and/or modify it under | ||
# the terms of the GNU Lesser General Public License as published by the | ||
# Free Software Foundation, either version 3 of the License, or (at your | ||
# option) any later version. | ||
|
||
# C-PAC is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
# License for more details. | ||
|
||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>. | ||
"""Global QC values""" | ||
_REGISTRATION_GUARDRAIL_THRESHOLDS = {'thresholds': {}} | ||
|
||
|
||
def registration_guardrail_thresholds() -> dict: | ||
"""Get registration guardrail thresholds | ||
Returns | ||
------- | ||
dict | ||
""" | ||
return _REGISTRATION_GUARDRAIL_THRESHOLDS['thresholds'] | ||
|
||
|
||
def update_thresholds(thresholds) -> None: | ||
"""Set a registration guardrail threshold | ||
Parameters | ||
---------- | ||
thresholds : dict of {str: float or int} | ||
Returns | ||
------- | ||
None | ||
""" | ||
_REGISTRATION_GUARDRAIL_THRESHOLDS['thresholds'].update(thresholds) |
Oops, something went wrong.