pyhf: POI application using formula - pyhf

I am trying to write a likelihood model in which the POI affects two samples, but while one I have the regular POI*yield, the other I have f(POI)*yield where f is an arbitrary function.
Is there a simple way to implement that in pyhf?
Thanks in advance.

pyhf currently does not support it, but it's something that is on our mind. Can you open an issue on our github with this as a feature request and we can work out how to do it.

Related

2D distributions in the HistFactory?

How can I specify in the construction of the HistFactory the signal and background to be 2-dimensional distributions?
I have understood than in RooStats you need to change the TH1 to a TH2.
At the moment to write my model in the json file can I use a ndarray to do something similar?.
Which is the correct way to do this?
I hope someone can help me and thank you in advance.
Currently the best way is to unroll the distributions e.g.
{'data': 2darray.ravel().tolist()}
Since mathematically it doesn't make any difference.
If you want to convert from XML+ROOT this is not yet supported (but could be). If so, please open an issue on GitHub.
Thanks for using pyhf!

How to make a power point presentation like this

maybe this is not the correct forum where to post this question, but i've serched for two weeks in the web, without results.
I need to make a kind of power point presentation, something like this - do know which program can i use?
Thank you
I think, that tool used for this prezentation can be find on
http://prezi.com/
This is called infographics and you can use website like visual.ly/
Then, you have to do your own effects

Library javascript for making histogram

i work on asp.net mvc3 project , and i have to display histogram in view depending on data coming from action, can you suggest me any library javascript that can be easy to use and make good histogram, please any syggestion !!
http://www.highcharts.com/ - excellent integration and nice looking (free for non-commercial)
http://www.jqplot.com/ - open source, nice looking as well (free as in beer)
http://g.raphaeljs.com/ - another open source, well maintained
http://www.flotcharts.org/ - built specifically for JQuery (if that is what you are using)
Basically, take a look at these and others, find one that looks good and will easily plug in to your existing architecture and roll.
If you just want to sort the data into bins, take a look at histogram.js.

How to store and find records based on location?

I'm thinking of building an application that helps you find local businesses (just an example). You might enter your zip code (or GPS if this is on a phone) and find the closest business within 10 miles, etc. My question is how can I achieve this type of logic? Is there a library or service that I will need to use? Or can this be done with math? I'm not familiar with how this sort of thing usually works, so let me know how I need to store the records so I can query them later. Note: I will be using Ruby and MongoDB.
It should be easy to find the math to solve that, providing lat/long coordinates.
Or you could use some full featured gem to do that for you like Geocoder, that supports Mongoid or MongoMapper.
Next time you need some feature that might be a commun world problem, first check if there is a gem for that at ruby-toolbox, for this case here are some other gems for geocoding
One more solution here...
http://geokit.rubyforge.org/
I think, this topic is already discussed here..

Using wildcards in Selenium IDE

I'm somewhat new to automation, and am learning everything auto-didactically, so forgive me if my terminology is a bit off. I've searched hi and low for an answer to this question, and I can't seem to find anything. I presume it's my small vocabulary when it comes to this stuff... anyway...
I'm attempting to write a test that performs all the actions necessary to complete a tutorial by using the recorder. However, for one particular step, the element ID changes. For example, the ID I'm trying to click is this:
//li[#id='message_661119']/div[2]/div[2]/a/img
However, for each new user that is performing the tutorial "quest", the number of the id changes.
Is there anyway to get Selenium to recognize, or use, wildcards? Example:
//li[#id='message_******']/div[2]/div[2]/a/img
Of course, the example above does not work.
Any advice would be immensely helpful. Thank you!!
You can use starts-with() for this:
//li[starts-with(#id, 'message_')]/div[2]/div[2]/a/img
It's one of the examples mentioned in Locating Techniques in Selenium's docs for starts-with().
In Target field of the command in Selenium IDE where you can see message_123123 click on a dropdownlist and choose an option which is related to xpath:idRelative or if this one doesn't work then try another options which do not include that annoying message_123123 so this way you'll identify webpage element by it's location but not id. I solved my issue this way

Resources