2011/08/13

PyTango in Ubuntu natty

I have installed the lastest relase of kubuntu in a new computer and there is a better newer way to have tango installed in your system than the guide for tango that I have posted


Tango has been released for 10.04 LTS distribution of ubuntu by one of the developers: Alessio Igor Bogani, worker in Trieste's synchrotron: Elettra. After that the idea have had succeed and we have a official repository for core of tango.


Then: I had s pending to publish a how to for this repository and mark the old one saying that here is this update. Well go ahead.


step 0: Remove older tango-cs packages
If you have installed this abogani's repository, is better if you remove its packages and then remove the file in the '/etc/apt/sources.list.d/abogani-tango-.list'.


$ sudo add-apt-repository ppa:tango-controls/core
This also adds for you the key of this repository in your keyring and the file 'tango-controls-core-.list' file.


Like in the abogani's way here there are two ways to continue: with or without tango-db. The second way assumes that there is another server with the tango database running.


step 1, option with db:
If mysql is not installed in the system do it. I am not sure if this works well being executed in the same apt command. I suggest to first install mysql and then tango:
$ sudo apt-get install mysql-server
$ sudo apt-get install tango-common tango-db tango-starter tango-test python-pytango libtango7-doc omninotify
This also installs the necessary dependencies.


step 1, option without db:
The list of packages to install is the same but without the tango-db package:

$ sudo apt-get install tango-common tango-starter tango-test python-pytango libtango7-doc omninotify


step 2, starter is running in your system:
Check is there are running processes from the new user 'tango'. For example, 
$ ps -ef |grep tango
Should show two process: the DataBaseds (the one who listen the port 10000) and the Starter (the one responsible to launch the device servers on start up in the correct sequence).


Also, another way to check that this works fine, is to try to "import PyTango" in a python interpreter.


I hope soon I will explain how to configure some devices to simulate things of a synchrotron machine. But before we will have to prepare and configure the tango core utilities.

2011/08/05

Looking back, four years from now

In last June, this blog have made 4 years, I'm really sad that is not walking the way I thought.


From the last two years I am not writing much about the main goals of this blog. Like the name says this has been think to post information about cryptology and about synchrotron related stuff (this partially more in general about the physics I'm learning due to my job, but also write about software engineering on my job). At least I have wrote this way in the second post. I remember when I wrote the first one.


But looking back, the fact is that the events in the job are not the best to focus on development. From the smallest to the biggest. From the macroeconomic to daily work. From the global crisis and the particular situation of Spain to the lasts incidents that happens at work.


What the hell!! Cannot be the things easier? Is not possible to live in peace? Dedicating the efforts in what makes work funy.


In Alba, the head of Experiments division "decided to stop activity": complicated way to say in an email that he will left Alba next September. In the "good bye" email, with the cold subject "information" (reflects a lot the behaviour of the workers at this institution) he have mention many times the word "reputation".


Next years will be crucial for this synchrotron reputation. I have a similar opinion, but a bit different perspective.


Yes, the Alba's reputation is made by many individual users who come to perform experiments. The effort of all the workers will make the users happy and they will comeback and tell they colleges about how good the work is done here.


And also there is motivation. Motivation of the workers to do our best. But since the last years this is becoming difficult. We succeed in linac start up in 2008, then comes the booster and after the storage, this year the beamlines commissioning. But there are "individuals" who have capacity to break this good environment. Specially the people how are upper in the hierarchy, they have more public skills. And they broke it.


By today, the company has been demanded in the trial for it's attitude against the workers unions. About the acts that some one in the management has made to threatening the workers. This action is not what brakes the environment, this is the consequence of an aggressive attitude subtended in time. A long time, years.


Don't believe them when they say: then the victim reports the assault is injuring the reputation of the institution. It's a very bad excuse and it criminalizes the victim to say that has been harm.


The directors of the cells consortium (and the LLS and the ST -4, another society in the Alba's area) have done many actions that disturbs the environment. Since I start to work here I have seen many situations of power abuse. Under the umbrella of this happens from time to time and you have to be aware and as far from him that you can work, the better. We have lost many good workers. There are examples of fired people, and many are people who left Alba as fast as possible to go to "better" places (meaning better by anywhere, but many to the ITER and its European corp). And all of them have a very good background and skills. They were very big losses. We suffer it.


The president of this institution has been kept inform of this events. He has been informed of the unpleasant situations with out acting to protect the workers. I think he is more interested in the reputation perspective from outside. If this news didn't go outside, to the public opinion, to the end-users, they are not important. Is not important if a worker is intimidated, the important thing is that no body else would know that.


I don't think as a good plan for reputation, when someone is attacked, try to silent the victim. This doesn't fix the problem, this would happen again, and it happens many times.


Having the people afraid to be vexed (or fired as a better situation) is not a way to make reputation on an institution. This is the way to have the people busy searching for a job somewhere else.

2011/08/04

Autocollimator device server

Recently I have write a little documentation for a device server to control an autocollimator. I'm specially glad for how this device is running and the integration with the Sardana system.

When the server is launched it tries to go to the live acquisition state. This means start receiving measures and showing them with in some attributes. This way you can have a gui where some attributes can be shown to see the current measures.

For example, you can say "I like to see the measures taken during 10 minutes". Then the device will continue collecting data and when it have this 10 minutes of samples it will cycle, having the same number of samples available from the last read.

But you may be interested in an usage of this laser to integrate data on time and collect it doing some steps. For example, if you have a surface to measure and you are scanning this surface with the laser to see how flat is this surface. For this you need synchronization between the movement and the acquisition.

That's why this device can go to a RUNNING state. In ON state is acquiring this live way.

The command start() will stop the live mode, clean the buffers (all of them intermediate and the one in the instrument), then it timestamps when the 'A' or 'R' is send to the instrument.

Then new data is collected during the time set in specific attributes for this purpose. At the end of the acquisition there will be launched a set of events to acknowledge the interface that this is done.

After this synchronous acquisition, the data will be available in this specific attributes and the live mode will continue (with clean buffers, remember).

Also I have test many error situations (hang intermediate device, unplug the instrument during some of the tasks of the devices, and so on), and it's reliable. Decays to fault state with an error message in the status to guide the user to set it up again.

2011/05/16

Libreoffice on launchpad

This last days I have installed the deb files for the Libreoffice, but I was thinking that over any update I was out of it.

I'm still running kubuntu 10.10 on my computers (but is planned and update to 11.04).

Easy I have search on the web for this words "libreoffice apt" and many publications are there. Probably is not necessary, certainly is redundant, but even that I like to share that the update to libreoffice is as simply as:

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice
sudo apt-get install libreoffice-kde


Gnome users must modify a bit the last line.

Ps: With more than a month of silence, at least one small post to go back to the activity...

2011/04/02

Reaching 100mA in the storage ring

Faster than the scheduled, yesterday 1st of April, we hit the milestone of the 100mA accumulated in the storage ring.

The 7th of March we receive the permission to start the commissioning of the storage ring (Monday, but was holidays in Barcelona). The 9th, we start and we did the first turn. It's not easy to reach this milestone that fast because many thing has been done blind and they was correct when too many parameters can fail.

Then we had stored beam the 13th and the 16th we start to accumulate beam in this ring.

During this last two weeks we was testing the subsystems that automatically kills the beam and it's better to do it with a low (but not too low) current. We did this test with about 40mA with success.

When the beam orbit goes close to the vacuum chamber, the beam positioning have to respond automatically to kill the beam that can break this chamber. If this brake happens the vacuum inside will be destroyed and this means months of problems.

With this tests pass, we can start increasing the more and more the current of this stored beam. From the evening of the 31th we start to increase this current. We've reach the 50mA, the 60mA, the 70mA, the 80mA, the 90mA... An at 18:25 of the 1st of April, we have reached the 100mA.

More important that this milestone itself, the great news is this was planed to be reach in June.

The work is not finish, but we are doing it faster than planed. Fine tuning is still pending, and this great speed on the milestones is not granting the next pending actions. But this give good feeling for that.

Update (20110408): This news has been published in the lightsources.org.

2011/03/22

First light of Alba in the news

I cannot find how to embed the video inside the post (put in a comment if you know how), but at least I have the link to the video in the most extended tv broadcast in Catalunya:


From the introduction they dedicate a lot of seconds, and inside the news review they have dedicated up to 2 minutes to the first synchrotron light in Alba (from 00:50 to 02:48).

Also they have explained another news about a work conflict (but not in the introduction) in a motorbikes factory, and they have dedicated to this: 1 minute (half of the time to the Alba's thing, from 03:27 to 04:30). If you look deep on to this news, how many red/black flags you can see?

2011/03/18

First x-ray light in Alba

We've working hard during this last years for this day, and it works at the firsts try!

After open the frontend shutter and moving the masks on this part, we just see current on the electrometers in side of the beamline Mistral. At the beginning it was an small current, in the order of the microamperes (uA). An in the first position where a ccd camera is placed we have seen this:



This image has been taken in the first moment I saw the beam and the minimum delay to take an snapshot. But After I have take better ones like:



There's an email to all Alba's stuff, from the experiments head, with this attachment:



In this email, he thanks all the colleagues involved to have this result (and I like to forward this email to the people who help for that but left before this event).

Also is explained that this is a footprint of a bending magnet light shaping it with the movable masks, and detailing that the marks on are 1mm separated.

This is the beginning of the next step!