At the awe-prompt the creator of data object myobject can be printed to the screen with
awe> myobject._creator # Returns user id 990 awe> from common.database.Database import Database awe> Database.users[myobject._creator] # Returns user name 'AWJJOPLIN'
|
At the awe-prompt the project to which data object myobject belongs can be printed to the screen with
awe> myobject._project #Returns project id 14 awe> from common.database.Database import Database awe> Database.projects[myobject._project] # Returns project name 'WFI@2.2m'
Some projects have all Astro-WISE users as members: these are called public projects. Some projects have a subset of Astro-WISE users as members: these are called private projects. One or more of the Astro-WISE users in a project can also act as project manager. A project manager has additional abilities and responsibilities to manage data objects that belong to a project. The extra abilities/responsibilities are for data objects at privileges levels of 3 and larger. At these privileges levels the data objects are visible to persons which are not project members. The concept of privileges is explained next.
An overview of all projects in the database, their members, the project's manager etc. can be found on our webpages at the following address:
http://process.astro-wise.org/Projectshttp://process.astro-wise.org/Projects.
Privileges of data objects determine which Astro-WISE users have access to the data object.
Each data object in Astro-WISE has one of five privileges as listed in Table .
The initial privileges of a data object are set upon the creation/ingestion of the data entity. They can be changed after that.
At the awe-prompt the privileges of data object myobject can be printed to the screen with
awe> myobject._privileges 1
Your Astro-WISE Context is defined by your Astro-WISE user identity, the current project you choose and the current minimum privileges level that you choose. The Astro-WISE user that you are is defined upon login as you login with a certain user name (e.g. AWJJOPLIN). Upon login, also a current project and a current minimum privileges level are set. These two initial selections depend on your login configuration. At the Astro-WISE command-line prompt, the python class context is the interface to view and change the selection of project and privileges level. You can import context at the Astro-WISE prompt via:
awe> from common.database.Context import contextTo see which minimum privileges level is currently active use
context.get_current_privileges()
awe> context.get_current_privileges() 1To change the minimum privileges level call the
context.set_privileges(<privileges>)
method :
awe> context.set_privileges(2)
To see which project is currently selected, use context.get_current_project()
. If the project object is printed, a formatted overview will be given:
awe> print context.get_current_project() Project: SONATE (id = 14) Description: 1700 Square degree 5 band survey of the equatorial strip and 2dF South region Instrument: OCAM Maximum Privileges: 4 (WORLD) Current Privileges: 1 (MyDB)Instrument lists the instrument associated with the project. If it is None it means data from any instrument can be associated with the project. Maximum Privileges is the maximum privileges level which a project member can assign to a data object. To change to a project called 'BLUES' at the awe-prompt use:
awe> context.set_project('BLUES')An user can only set projects of which the user is a member. When a project is selected without specifying the minimum privileges level they will be set to their default: 1.
To select at the same time the project and the minimum privileges level at the awe-prompt use:
awe> context.set_project('BLUES', privileges=2)
The philosophy in Astro-WISE is to increase efficiency in survey processing by sharing useful public data (such as calibration data). The philosophy of Context is therefore to allow users to select which data they want to see in their data access scope in addition to public data from Astro-WISE projects.
Whether a data object falls within the data access scope of the Context as currently configured depends on the values of 3 attributes which each data object has:
_privileges
_project
_creator
The minimum privileges level chosen for your Context defines from which privileges level on you want to have access to data objects. Thus, by lowering the minimum privileges level you add data objects to your data access scope. A minimum privileges level of i
As an example, assume that you select your Context to have project='BLUES' and minimum privileges level=1. Then your data access scope will include
Upon creation/ingestion of an object the values of its attributes
Only project members can ingest/create data in a project. Data objects can not be created and ingested at all privileges levels.
In private projects, the project members can create and ingest data objects only at privileges levels 1 and 2. Only project managers can then promote data objects to higher privileges levels up to privileges levels equal 5. This is called publishing and is described in the next section. In public projects the Astro-WISE users can ingest and create data object up to all privileges levels up to a maximum of 4.
The philosophy of Astro-WISE is to share results across projects whenever beneficial. An example are shared calibration data. With time calibration scientists of projects will improve their knowledge and methods how to make the best calibration data for that instrument. For example, the improvements could be based on long term trend analysis. In this sense not individual nights but complete instruments become calibrated in Astro-WISE . The calibration scientists can share their improved calibration data with the Astro-WISE community by publishing his results to a privileges level of 3 or higher. Astro-WISE users, also in other projects, can then re-process their data using these improved calibration data. Furthermore, to improve their own calibrations of other periods they can inspect how the calibration was derived by the calibration scientist because they can access the data lineage of a data object. In conclusion, the idea is that with time data objects are promoted to higher privileges levels. This promotion to a higher privileges level is called publishing in Astro-WISE .
Only the creators and project managers can publish data objects of a project. Table shows who can publish data objects to which privileges levels in public and private projects.
Publishing up to and including privileges level 3 is recursive: all dependencies are promoted to the published level as well.
Here is an example how to publish an object to privileges level 3:
The result of publishing is a larger number of people (Astro-WISE users and possibly persons without an Astro-WISE account) who can view and access the data as listed in Table
It is possible to demote the privileges level of a data object down to privileges level 2. This is called unpublishing.
For example, unpublishing an object to privileges level 2 is done via:
Objects can be depublished to privileges level 2 if they are not referenced by data objects at privileges level 3 or higher. If they are, it might be desirable to invalidate the object. One can inspect whether a data object thisobject is valid as follows:
minimum
privileges level
of Context
data access scope
5
3#3
4
3#3
3
3#3
2
3#3
1
3#3
where the data represented by 3#3
_privileges
, _project
and _creator
:
dataset
_privileges
==_project
==_creator
==3#3
5
ANY project
ANY creator
4#4
4
ANY project
ANY creator
5#5
3
ANY project
ANY creator
6#6
2
PROJECT A
ANY creator
7#7
1
ANY project of which USER X is a member
USER X
1.1.2.2 Data creation scope
_project
, _privileges
and _creator
are :
_project
set to the id of the project of your Context
_privileges
set to the minimum privileges level of your Context
_creator
set to the id of your Astro-WISE user identity
1.1.3 Publishing of data objects
project type
creator
project manager
private
(1) 8#8 (2)
(2, 3, 4) 8#8 (3, 4, 5)
public
(1, 2, 3) 8#8 (2, 3, 4)
(2, 3, 4) 8#8 (3, 4, 5)
So in private projects the project manager is solely responsible for the project data which is accessible to people outside the project team.
awe> context.publish(object, privileges=3, commit=True, verbose=True)
1.1.3.1 Publishing of an object with dependencies in different projects
It is possible that an object has dependencies in different projects.
If the object has privileges level 1#1 2
1.1.3.2 Unpublishing and invalidation
awe> context.publish(object, privileges=2, commit=True, verbose=True)
awe> thisobject.is_valid
1
1 means valid, 0 means invalid. To invalidate thisobject use:
awe> context.update_is_valid(thisobject,0)
1.1.4 Deletion
Objects can be deleted from the database under the following restrictions. Every user can delete the data he created at the MYDB privileges level 1. For higher privileges levels only the project manager is allowed to delete.
To delete a data object myobject from the database use:
awe> context.delete(myobject)
Objects can be deleted if they are not referenced by other data objects.
If they are, it might be desirable to invalidate the object. One can inspect whether a data object thisobject is valid as follows:
awe> thisobject.is_valid
1
1 means valid, 0 means invalid. To invalidate thisobject use:
awe> context.update_is_valid(thisobject,0)