response codes in audiovisual stimulus presentation - audio

I built an experiment in Builder view Psychopy (v1.82.01) presenting an image only, sound only and image plus sound together. For my analysis, I need a record of whether the stimulus is image, sound and image plus sound. Do the columns in the excel file entitled ‘key_resp_3.keys’, ‘key_resp_4.keys’ and ‘key_resp_5.keys’ represent the button code the participants press to ‘IMAGES’, ‘SOUNDS’ and ‘IMAGES AND SOUNDS’ respectively?
Is this correct? I just want to check whether I am interpreting this correctly.
I would greatly appreciate some help.
Many thanks!
Georgia
PS I am happy to send the excel file (i can't see where i can attach it)

key_resp_3, key_resp_4, etc refer to the keyboard components with those names in your routines.
So if, for example, key_resp_3 occurs in the routine where only an image is shown, then yes, that is what the response represents.
But if key_resp_3 is on a routine that can show different combinations of stimuli, then you would need some other way to indicate what the response represents (e.g. a column in your Excel file which indicates what sort of stimulus is being presented).

Related

Get value within TV’s html attribute in Modx

I’m new to Modx so I don’t know if this is possible or not.
My TV, in this case [[*myTV]] outputs the following:
<data value='www.mylink.com'>Description</data>
Is there a way to only display the data value in the front-end? In this case I just want to display the url.
My recommendation would be to keep the data (in this case the URL) and the html separate, and that might help your situation. If the TV only includes the URL itself, then it makes it much easier to deal with the output of the TV using output modifiers. As an example, if [[*myTV]] contains www.mylink.com for a particular resource and you want the original output in your question, you could do something like:
[[*myTV:default=`<data value='[[*myTV]]'>Description</data>`]]
You can also nest TVs within output modifiers, so if for example you had a corresponding [[*description]] TV that describes the URL in [[*myTV]], you could use:
[[*myTV:default=`<data value='[[*myTV]]'>[[*description]]</data>`]]
TL;DR... The short version: Storing the entire output in the TV and extracting text from within that TV to output is much more difficult than storing individual components of that output in separate TVs and bringing them together for output when needed.
The longer version: In any situation where you're storing both data and HTML in a TV (which is not advisable in the vast majority of cases), you'll likely find duplication of your data across your project, and if by chance you decide to change the html at some point in the future, you then have to go into each and every TV field and change that HTML, which is the opposite effect from what a CMS is supposed to do - i.e. make Content Management easier!
If you do happen to find a use case for storing TVs along with their HTML formatting, that is a job best left for MODX Chunks, where you can code the implementation of your TVs within HTML in one spot within MODX and instead of duplicating that code everywhere, you reference the chunk like so: [[$chunk]].

How to keep headline and text in the same column using ColumnText?

I'm using iText to create a PDF file. While testing, a situation occurred where a headline was printed at the bottom of a column but the appendant text in the next.
The easy solution paragraph.setKeepTogether( true ); results in to much white space (see additional info below). Here is an image showing the current situation on the left and what I'd like to get on the right:
current and wanted situation (reputation...)
One of my biggest problems is, columnText.getYLine() returns the lowest position in the "origin" column even if the text flows over to the next.
I looked through the examples on the iText site and all results on stackoverflow for "itext column" plus some blogs but did not find any solution to my problem, other than printing each article in a new column. A concise description of the problem in a few words would help me search myself as English isn't my first language.
additional info
This is part of the report generation in a telemedicine project. A page template is filled by a web front end. There are several post processing steps e.g. attaching images of ECG output. These need a high pixel density to be readable, which is why I use iText (afaik pdfbox scales without taking the density into consideration). Some time ago the physicians noticed they had to insert more text than there's space on one page. So they wanted the overflow in an appendix. I could use another lib. The importance is on high readability on paper and a licence like (l)gpl/apache/... The white space results in more pages hence lessens the overview and wastes paper.
The setKeepTogether() method isn't supposed to work in combination with ColumnText. As documented in my book (the one shown in my avatar), the ColumnText class can be used in similation mode to finetune the layout.
The idea is that you define the location of your content in a trial-and-error process. First you add content and you invoke go(true); This will consume the content in your column, but will not add any content to your document. You can use this to discover how many lines have been written (getLinesWritten()), to check if all the content could be rendered (hasMoreText()), and so on.
Suppose that you find out that all the text can be written using the available space, you add the content to the column once more, change the Y-position to its original value, and add the column for real: go();
If there's content left in the column, you should create a new column, add the content anew and then make a decision. Change the position of the column and go(); If there's content left, but the content can be broken in two parts, change the Y-position and go(); then change the position of the column and invoke go() once more to render the remainder of the content in a different column.
You'll find different ColumnText examples in chapter 3.

How to print a multi-page map with data from excel, MapPoint and VBA maybe?

I have an excel file with information on my company's customers including addresses and latitude and longitude. I need to generate printed street maps showing a reasonable level of detail with pins showing the customers and bubbles displaying their info. Essentially I need to create something that looks like a Thomas Guide except with our customer info layered on to the street maps. I've been looking for DAYS and can't find any software to automate this process.
Currently I'm importing the data into Microsoft MapPoint, which does a fine job of generating the map with all necessary data. However MapPoint can only print what's currently displayed on the screen. So I'm stuck printing at a close zoom level, scrolling over, printing again, and continuing this process ad nauseum.
Is there maybe a way to automate this with VBA in MapPoint? I can find almost no info online about VBA for MapPoint.
Or maybe there's a piece of software out there that can do this at the push of a button. Printing a multi-page map of an area doesn't seem like that crazy of a demand.
Any help would be appreciated.
MapPoint's API is actually pretty well documented in the MapPoint help file, and most of the examples use VB6, which should be adaptable for VBA - you will need to add a reference to MapPoint's object model.
Yes you can automate the printing. Other approaches include copying to the clipboard; save to web page (and extract the Map's GIF image); or to use the GetPictureFromObject(). I recently wrote an article about using the latter from C# (it would be simpler from VB6 or VBA)
You could also print to a very large PDF, see the tips from this newsletter --
http://www.mp2kmag.com/update/mappoint.newsletter/2013-02-18/
Here's a direct link to the article --
http://www.mapforums.com/print-large-multiple-sheet-maps-any-printer-27603.html
Eric

Kofax Capture 8.0 - Document Separation Problems

I have a batch class (KC8) which is using page/form recognition and separator zones ("Page 1 of" = separator value). It seems like about 50% of the time it will improperly separate the documents, with some not even getting the correct form type, and others breaking off pages 1, 2 and 3 and 4 into 3 separate documents when they should only be one. Of course all of this gets to the Quality Control queue, but when you unreject them they seem to process and release with no problems. Why is this happening? Shouldn't they continuously fail to be recognized and separated properly if they failed the first time? Does anyone have any similar experience or advice for fixing it? Please ask any questions you need to clarify the details of the batch class if you need it.
Thanks,
Matt
I solved the separation issue. Part of the problem was a form id zone located in a place on the form that moved around depending on how much information was entered into one of the fields near the top of the page. Obviously pages like that would not be recognized. I picked a different recognition zone (company logo + text image) that did not move around and everything is fine now.

CAPTCHAS and img name /displayed value association

Unfortunately I am having trouble summing up this question in one phrase/line, thus I am forced to initially hint as to what my understanding is before asking the question in fear of me asking a question based on wrong facts or assumptions. As I understand “and please correct me if am wrong”, as I understand captchas work like so:
Have numerous images, and associate each image name/source to its displayed characters value.
Display image, then have user input what they see.
Match user's input against the character value which is associated with that image's name/source.
Assuming my understanding is correct: Given an unlimited amount of time,
Can't one associate image
names/sources with the displayed
characters increasing the chance of
cracking the captcha as they gather
more associations?
In that case, wouldn't the security strength of captchas be parallel the size of the image database?
NOTICE: As i suspected my question was based on wrong understanding.
Short answer! These are dynamic images and they are not stored anywhere. You wont even find them in the source code..
Wikipedia has good explanation about this. Alternatively check out the related questions in SO.
Edit: Goto this page where you can see an example of a captcha. Use firebug to see the HTML code for this image and you will see something like this.
<img height="57" width="300" src="http://www.google.com/recaptcha/api/image?c=03AHJ_VutaG4ahxWuQv0e6edYypp_FM8QuFIZkG75AnAm8iu3WRmwQ41jqcvojmKmbSKXxkf_s9fk61-axEp77_omKZZEYliE35BND_hXNh3Jac6ZUAeD08wOMZPj4W2s-A39vAI84eim5q-z9kFnmoSmon1jG2LmmFw" style="display: block;">
Did you notice the source? It does not point to an image file.
You can copy this url and generate the image (just open it in a browser). So you can develop an application which can download this image and then scan for color change in pixels and try to match for alphabets and numbers but if you notice almost all the alphabets and numbers are connected and closer so it is difficult to seperate different alphabets.
Even if you manage to seperate most of the alphabtes are not perfect. example :
(source: watblog.com)

Resources